-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update publishing script for releases (#273)
- Loading branch information
Showing
4 changed files
with
30 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,31 @@ | ||
#! /bin/bash | ||
|
||
# publish releases (already tagged by publish_release.sh) | ||
if [[ "$TRAVIS_COMMIT_MESSAGE" =~ chore\(release\):[[:space:]]version[[:space:]][0-9]+\.[0-9]+\.[0-9]+$.* ]]; then | ||
git config --global user.email "fundamental@sap.com" | ||
git config --global user.name "fundamental-bot" | ||
|
||
git checkout master | ||
npm install | ||
|
||
# publish releases | ||
if [[ "$TRAVIS_BRANCH" = "tmp_branch_for_automated_release_do_not_use" ]]; then | ||
# delete tmp_branch_for_automated_release_do_not_use branch from remote | ||
git push "https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG" :tmp_branch_for_automated_release_do_not_use > /dev/null 2>&1; | ||
|
||
# update the package version and commit to the git repository | ||
npm run std-version | ||
|
||
# pushes changes to master | ||
git push --follow-tags "https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG" master > /dev/null 2>&1; | ||
|
||
npm publish | ||
|
||
# bump and publish rc | ||
else | ||
git config --global user.email "fundamental@sap.com" | ||
git config --global user.name "fundamental-bot" | ||
|
||
git checkout master | ||
# update the package verion and commit to the git repository | ||
# update the package rc version and commit to the git repository | ||
npm run std-version -- --prerelease rc --no-verify | ||
|
||
# pushes changes to master | ||
git push --verbose --follow-tags "https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG" "$TRAVIS_BRANCH" > /dev/null 2>&1; | ||
|
||
npm publish --tag prerelease | ||
fi | ||
fi |
This file contains 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
This file contains 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