Skip to content

Commit

Permalink
chore: update script for rc (#10688)
Browse files Browse the repository at this point in the history
* chore: update script for rc

* chore: add tag script for rc

* chore: make fixes to ensure correct tag
  • Loading branch information
danielleadams authored Jul 7, 2022
1 parent 2f8b535 commit c04a791
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .circleci/config.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,10 @@ jobs:
name: Publish Amplify CLI
command: |
bash ./.circleci/publish.sh
- run:
name: Push RC tag
command: |
bash ./scripts/tag-rc.sh
- run: *scan_e2e_test_artifacts
github_prerelease:
<<: *linux-e2e-executor
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"pkg-all": "source .circleci/local_publish_helpers.sh && generatePkgCli",
"pkg-all-local": "yarn verdaccio-start && yarn verdaccio-connect && yarn publish-to-verdaccio && yarn pkg-all && yarn verdaccio-disconnect",
"publish:master": "lerna publish --canary --force-publish --preid=alpha --exact --include-merged-tags --conventional-prerelease --no-verify-access --yes",
"publish:dev": "lerna publish --canary --force-publish --preid=alpha --exact --include-merged-tags --conventional-prerelease --no-verify-access --yes",
"publish:dev": "lerna publish --preid=rc.$(git rev-parse --short HEAD) --pre-dist-tag rc --exact --include-merged-tags --no-verify-access --conventional-prerelease --conventional-commits --yes",
"publish:beta": "lerna publish --exact --dist-tag=beta --preid=beta --conventional-commits --conventional-prerelease --message 'chore(release): Publish [ci skip]' --no-verify-access --yes",
"publish:tag": "lerna publish --exact --dist-tag=$NPM_TAG --preid=$NPM_TAG --conventional-commits --conventional-prerelease --message 'chore(release): Publish tagged release $NPM_TAG [ci skip]' --no-verify-access --yes",
"publish:release": "lerna publish --conventional-commits --exact --yes --message 'chore(release): Publish [ci skip]' --no-verify-access",
Expand Down
11 changes: 11 additions & 0 deletions scripts/tag-rc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

if [[ "$CIRCLE_BRANCH" != "dev" ]]; then
echo "Skipping because this branch is not deploying a release candidate"
exit 0
fi

rc_tag="v$(jq -r .version packages/amplify-cli/package.json)"
commit="$(git rev-parse HEAD~1)"
git tag $rc_tag $commit
git push $rc_tag

0 comments on commit c04a791

Please sign in to comment.