You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The release script should only run on a specific configured branch (e.g. main). At the moment it can be executed from any branch, which can lead to accidental releases from open PR branches or outdated feature branches. This leaves main behind while the release is created from the wrong branch.
To avoid this, the release script should:
Check that the current branch is main (or another configurable default branch, e.g. master).
If not on the correct branch, abort with a clear error message like:
"Release can only be triggered from main. Current branch: ".
Optionally allow overriding with a flag if someone really wants to release from another branch.
This would reduce mistakes and ensure releases are only cut from the intended base branch.