Skip to content

Commit

Permalink
Fix previous commit detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Naxesss committed Oct 25, 2024
1 parent 8a49c58 commit 50b5ad2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/check-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ jobs:
run: |
CURRENT_VERSION=$(jq -r '.version' app/package.json)
PREVIOUS_VERSION=""
PREVIOUS_COMMIT=${{ github.event.before }}
echo "Current version is $CURRENT_VERSION."
echo "Current commit is $(git rev-parse HEAD)."
echo "Previous commit was ${{ github.event.before }}."
echo "Previous commit was $PREVIOUS_COMMIT."
for commit in $(git rev-list $GITHUB_EVENT_BEFORE..HEAD); do
for commit in $(git rev-list $PREVIOUS_COMMIT..HEAD); do
VERSION=$(git show $commit:app/package.json | jq -r '.version')
echo "In a previous commit, the version was $VERSION."
Expand Down

0 comments on commit 50b5ad2

Please sign in to comment.