Skip to content

Commit

Permalink
Do commit sha
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanformio committed Mar 19, 2024
1 parent 335b20e commit 9739d33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ jobs:
echo "Master branch fetched successfully."
# Use git log to count commits if git rev-list does not work as expected
SHORT_SHA=${GITHUB_SHA::7}
COMMIT_COUNT=$(($(git log master..HEAD --oneline | wc -l) - 1))
NEW_VERSION="${CURRENT_VERSION}-dev.${PR_NUMBER}.${COMMIT_COUNT}"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
Expand All @@ -122,5 +123,5 @@ jobs:
- name: Echo version for testing
run: |
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
echo "Commit SHA: $SHORT_SHA"
echo "Version to publish: $NEW_VERSION"

0 comments on commit 9739d33

Please sign in to comment.