-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Paul-Kawalkowski <[email protected]> Co-authored-by: Matt Howard <[email protected]>
- Loading branch information
1 parent
7a67d64
commit 2a02a66
Showing
2 changed files
with
5 additions
and
35 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 |
---|---|---|
|
@@ -19,43 +19,13 @@ | |
set -e | ||
|
||
WORKING_DIR="$PWD" | ||
MAIN="main" | ||
|
||
checkout_branch() | ||
{ | ||
echo "Checkout $1" | ||
git checkout $1 | ||
git fetch origin | ||
git pull | ||
} | ||
|
||
commit_changes() | ||
{ | ||
pushd $WORKING_DIR | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Automated build" | ||
git add ./canvas_modules/common-canvas/package.json | ||
git status | ||
git commit -m "$2" | ||
echo "Push changes to $1" | ||
git push | ||
popd | ||
} | ||
|
||
setup_git_branch() | ||
{ | ||
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" | ||
git fetch | ||
} | ||
|
||
setup_git_branch | ||
checkout_branch ${MAIN} | ||
|
||
cd ./canvas_modules/common-canvas | ||
npm version minor | ||
release=$(echo $GITHUB_REF_NAME | cut -d'v' -f2) | ||
echo "Release is set to $release" | ||
npm version $release | ||
NPM_VERSION=`node -p "require('./package.json').version"` | ||
echo "Updated main build $NPM_VERSION" | ||
commit_changes ${MAIN} "Update Elyra Canvas to version ${NPM_VERSION} [skip ci]" | ||
echo "Updated $GITHUB_REF_NAME build $NPM_VERSION" | ||
|
||
echo "Publishing Elyra Canvas $NPM_VERSION to Artifactory NPM" | ||
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ~/.npmrc | ||
|