Skip to content

Commit

Permalink
Fix typo in version comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
wkelly1 committed Oct 23, 2024
1 parent 33d89fd commit 9b812b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/generate_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,20 @@ jobs:
run: |
# Fetch the package.json version from the previous commit
BASE_VERSION=$(git show ${{ steps.previous_commit.outputs.commit_hash }}:package.json | jq -r .version)
echo "Previous version: $BASE_VERSION"
echo "base_version=$BASE_VERSION" >> $GITHUB_OUTPUT
- name: Get the current package.json version (after merge)
run: |
# Extract the current package.json version at the HEAD
CURRENT_VERSION=$(jq -r .version package.json)
echo "Current version: $CURRENT_VERSION"
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
- name: Compare versions
if: ${{ steps.previous_commit.outputs.commit_hash }}
run: |
if [ "${{ steps.previous_commit.outputs.base_version }}" != "${{ steps.previous_commit.outputs.current_version }}" ]; then
if [ "${{ steps.previous_commit.outputs.BASE_VERSION }}" != "${{ steps.previous_commit.outputs.CURRENT_VERSION }}" ]; then
echo "Version has changed"
echo "version_changed=true" >> $GITHUB_OUTPUT
else
Expand Down

0 comments on commit 9b812b0

Please sign in to comment.