Skip to content

Commit

Permalink
#1741 Update Publishing Workflow (#1734)
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
Paul-Kawalkowski and matthoward366 authored Mar 5, 2024
1 parent 7a67d64 commit 2a02a66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 35 deletions.
2 changes: 1 addition & 1 deletion canvas_modules/common-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elyra/canvas",
"version": "12.42.0",
"version": "0.0.0",
"description": "Elyra common-canvas",
"main": "dist/common-canvas.js",
"module": "dist/common-canvas.es.js",
Expand Down
38 changes: 4 additions & 34 deletions scripts/publish_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2a02a66

Please sign in to comment.