Skip to content

Commit

Permalink
update marketplace version
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-yangy committed Sep 26, 2024
1 parent 1b90b1a commit f7c63d1
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ jobs:
- name: Update Version in package.json
id: replace_version
run: |
FILE=./src/Packages/Passport/package.json
PASSPORT_FILE=./src/Packages/Passport/package.json
MARKETPLACE_FILE=./src/Packages/Marketplace/package.json
CURRENT_VERSION=$(jq -r '.version' $FILE)
CURRENT_VERSION=$(jq -r '.version' $PASSPORT_FILE)
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
# Increment version based on UPGRADE_TYPE
Expand All @@ -75,8 +76,14 @@ jobs:
esac
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
jq --arg version "$NEW_VERSION" '.version = $version' $FILE > tmp.$$.json && mv tmp.$$.json $FILE
echo "Updated version in package.json from $CURRENT_VERSION to $NEW_VERSION"
# Update Passport package.json
jq --arg version "$NEW_VERSION" '.version = $version' $PASSPORT_FILE > tmp.$$.json && mv tmp.$$.json $PASSPORT_FILE
echo "Updated version in Passport package.json from $CURRENT_VERSION to $NEW_VERSION"
# Update Marketplace package.json
jq --arg version "$NEW_VERSION" '.version = $version' $MARKETPLACE_FILE > tmp.$$.json && mv tmp.$$.json $MARKETPLACE_FILE
echo "Updated version in Marketplace package.json from $CURRENT_VERSION to $NEW_VERSION"
echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit f7c63d1

Please sign in to comment.