-
Notifications
You must be signed in to change notification settings - Fork 134
ci: fix ERELEASEBRANCHES and allow RC version bump to dev #2188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: doodlum/skyrim-community-shaders
Length of output: 58
🏁 Script executed:
Repository: doodlum/skyrim-community-shaders
Length of output: 91
🏁 Script executed:
Repository: doodlum/skyrim-community-shaders
Length of output: 306
🏁 Script executed:
Repository: doodlum/skyrim-community-shaders
Length of output: 1300
🏁 Script executed:
# Read the .releaserc.js file cat -n .releaserc.jsRepository: doodlum/skyrim-community-shaders
Length of output: 1386
🏁 Script executed:
# Check package.json for semantic-release dependencies cat package.jsonRepository: doodlum/skyrim-community-shaders
Length of output: 120
🏁 Script executed:
Repository: doodlum/skyrim-community-shaders
Length of output: 58
🏁 Script executed:
Repository: doodlum/skyrim-community-shaders
Length of output: 58
🏁 Script executed:
Repository: doodlum/skyrim-community-shaders
Length of output: 170
🏁 Script executed:
# Read the release workflow to understand how the plugin is invoked cat -n .github/workflows/release.yamlRepository: doodlum/skyrim-community-shaders
Length of output: 1751
🌐 Web query:
@google/semantic-release-replace-plugin from callback support API documentation💡 Result:
The
@google/semantic-release-replace-plugin(also published as semantic-release-replace-plugin) supports callback functions for both the 'from' and 'to' options in its Replacement configuration interface. This is an advanced feature primarily for use with release.config.js (JavaScript config files), as JSON configs cannot express functions. Key details from the official API documentation: - from: Can be From or From[], where From is string | RegExp | FromCallback. FromCallback is defined as (filename: string, ...args: unknown[]) => RegExp | string. Consult replace-in-file docs for advanced matching with callbacks, RegExps, etc. - to: Can be To or To[], where To is string | ToCallback. ToCallback is (match: string, ...args: unknown[]) => string. Callback args vary: - For simple string 'from', 'to' callback simplest form receives the filename. - For RegExp 'from', args include captures, offset, matched string, etc. (per String.replace docs). Example for 'to' callback (from docs): { from: VERSION = 11, to: (matched) => VERSION: ${parseInt(matched.split('=')[1].trim) + 1}, } The plugin uses replace-in-file under the hood, adapting its API (single from/to vs. arrays). Templates like ${nextRelease.version} are rendered first using semantic-release context. Note: Requires release.config.js for callbacks; package.json configs are limited to strings. Pair with@semantic-release/gitto commit changes. Official sources: GitHub repo at https://github.com/jpoehnelt/semantic-release-replace-plugin (docs/interfaces/Replacement.md and types). NPM pages confirm@google/namespace is the same package.Citations:
The callback proposal has a critical flaw: it breaks no-op behavior for stable releases.
The concern is valid—dropping
resultsvalidation lets regex drift silently—and@google/semantic-release-replace-plugindoes support callback-basedfromoptions. However, the proposed guard would throw an error when the CMake version pattern is absent, which occurs on stable releases after RC (when the pattern was already replaced). The comment explicitly states "stable after RC is a no-op (version already set)," but the callback would fail instead of allowing that no-op state.To preserve no-op replacements while catching regex drift, consider this approach instead:
Alternative guard preserving no-op behavior
Rather than asserting the match exists upfront, validate that the pattern was either replaced OR already matched the desired state:
This allows the regex to match (replacing any prerelease version) while still catching if the VERSION line is missing entirely.
🤖 Prompt for AI Agents