Update release process#622
Merged
Merged
Conversation
| ( | ||
| cd "$repo_root/SampleApp" | ||
| bundle exec pod install | ||
| if gh release view "$version" > /dev/null 2>&1; then |
Contributor
There was a problem hiding this comment.
🤖 Suggestion: Could we also guard against an existing tag for this version before creating the release? gh release create "$version" --target "$target_sha" only uses --target when it auto-creates the tag. If the tag already exists but no release exists yet, this can create the release from that existing tag even though the script printed a different target SHA.
One option:
existing_tag_sha=$(git rev-parse --verify --quiet "$version^{commit}" || true)
if [[ -n "$existing_tag_sha" && "$existing_tag_sha" != "$target_sha" ]]; then
echo "Error: Tag $version already exists at $existing_tag_sha, not $target_sha." >&2
exit 1
fi
Member
Author
There was a problem hiding this comment.
Opened #623 to address this. The new guard checks an existing version tag before release creation and fails if it resolves to a different commit than the requested target.
johnnewman-square
approved these changes
Jun 17, 2026
robmaceachern
added a commit
that referenced
this pull request
Jun 17, 2026
## Summary - Add an explicit existing-tag guard before `gh release create` runs. - Fail when the requested version tag already exists at a different commit than the resolved release target. - Allow the script to continue when an existing tag resolves to the same target commit. ## Feedback Addressed Addresses the concern from #622 (comment). The review was valid: `gh release create --target` only affects auto-created tags, so an existing tag without a release could have caused the release to be created from a different commit than the script printed. ## Validation - `bash -n Scripts/release.sh` - `Scripts/release.sh --version 9.9.9 --dry-run --no-open` - `Scripts/release.sh --version 6.7.2 --target origin/main --dry-run --no-open` fails with the new mismatched-tag error - `Scripts/release.sh --version 6.7.2 --target 6.7.2 --dry-run --no-open` reaches the existing-release guard - `git diff --check` `shellcheck` is not installed locally.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
CHANGELOG.mdas historical and no longer maintained.RELEASING.mdto use GitHub auto-generated release notes, including the default draft flow and the explicit--publishoption.gh release create --generate-noteshelper.Validation
bash -n Scripts/release.shScripts/release.sh --version 9.9.9 --dry-run --no-opengit diff --checkshellcheckwas not available locally.