File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -88,13 +88,13 @@ npm run build:release
8888echo " Ran publish build."
8989
9090echo " Making a $VERSION version..."
91- # TODO: Remove the following command.
92- # npm version command had previously failed claiming unclean git repo, and we don't know why.
93- echo " DEBUG: Running git status to show dirty files... "
94- git status
95- npm version $VERSION
91+ if [[ $PRE_RELEASE != " " ]] ; then
92+ npm version pre $VERSION --preid=rc
93+ else
94+ npm version $VERSION
95+ fi
9696NEW_VERSION=$( jq -r " .version" package.json)
97- echo " Made a $VERSION version."
97+ echo " Made a $NEW_VERSION version."
9898
9999echo " Making the release notes..."
100100RELEASE_NOTES_FILE=$( mktemp)
@@ -105,14 +105,19 @@ cat CHANGELOG.md >> "${RELEASE_NOTES_FILE}"
105105echo " Made the release notes."
106106
107107echo " Publishing to npm..."
108- if [[ $DRY_RUN == " " ]]; then
109- npm publish
110- else
108+ if [[ $DRY_RUN != " " ]]; then
111109 echo " DRY RUN: running publish with --dry-run"
112110 npm publish --dry-run
111+ else
112+ npm publish
113113fi
114114echo " Published to npm."
115115
116+ if [[ $PRE_RELEASE != " " ]]; then
117+ echo " Published a pre-release version. Skipping post-release actions."
118+ exit
119+ fi
120+
116121if [[ $DRY_RUN != " " ]]; then
117122 echo " All other commands are mutations, and we are doing a dry run."
118123 echo " Terminating."
Original file line number Diff line number Diff line change 9999 - " REPOSITORY_ORG=${_REPOSITORY_ORG}"
100100 - " REPOSITORY_NAME=${_REPOSITORY_NAME}"
101101 - " DRY_RUN=${_DRY_RUN}"
102+ - " PRE_RELEASE=${_PRE_RELEASE}"
102103
103104options :
104105 volumes :
@@ -107,6 +108,7 @@ options:
107108
108109substitutions :
109110 _VERSION : " "
111+ _PRE_RELEASE : " "
110112 _DRY_RUN : " "
111113 _KEY_RING : " npm-publish-keyring"
112114 _KEY_NAME : " publish"
You can’t perform that action at this time.
0 commit comments