From 2a02a661e007687f475049c5d96929074d37a834 Mon Sep 17 00:00:00 2001 From: Paul-Kawalkowski <139988315+Paul-Kawalkowski@users.noreply.github.com> Date: Tue, 5 Mar 2024 07:35:34 -0800 Subject: [PATCH] #1741 Update Publishing Workflow (#1734) Signed-off-by: Paul-Kawalkowski Co-authored-by: Matt Howard --- canvas_modules/common-canvas/package.json | 2 +- scripts/publish_modules.sh | 38 +++-------------------- 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/canvas_modules/common-canvas/package.json b/canvas_modules/common-canvas/package.json index f68d025268..99fa59dd46 100644 --- a/canvas_modules/common-canvas/package.json +++ b/canvas_modules/common-canvas/package.json @@ -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", diff --git a/scripts/publish_modules.sh b/scripts/publish_modules.sh index 26c9fb6eee..256594cc68 100755 --- a/scripts/publish_modules.sh +++ b/scripts/publish_modules.sh @@ -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 "elyra-canvas@users.noreply.github.com" - 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