Skip to content
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

ci(release): push release to master and allow retrying releases #5482

Merged
merged 4 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ jobs:

- name: 'Updates the stableVersion field'
run: |
# Revert the change from "Build a binary for convenience"
git update-index --no-skip-worktree -- .yarnrc.yml
git checkout HEAD -- .yarnrc.yml

RELEASE_COMMIT=$(git rev-parse HEAD)
node ./scripts/stable-versions-store.js
git fetch origin master
Expand All @@ -68,3 +72,4 @@ jobs:
git checkout $RELEASE_COMMIT -- packages/*/bin/**
git add .
git commit -m 'Sync master with the changes from ${{github.event.inputs.branch}}'
git push
4 changes: 2 additions & 2 deletions scripts/release/01-release-tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ done
RELEASE_DETAILS=$(yarn version apply --all --json ${APPLY_OPTIONS})
RELEASE_SIZE=$(wc -l <<< "$RELEASE_DETAILS")

if [[ $RELEASE_SIZE -eq 0 ]]; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check didn't work since an empty string counts as a line.

$ wc -l <<<""
1

if [[ -z $RELEASE_DETAILS ]]; then
echo "No package to release"
exit 1
exit 0
elif [[ $RELEASE_SIZE -eq 1 ]]; then
COMMIT_MESSAGE="Releasing one new package"
else
Expand Down