Skip to content

Commit

Permalink
show current branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanformio committed Mar 19, 2024
1 parent 8cb383c commit 41dac20
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,15 @@ jobs:
echo "Master branch fetched successfully."
# Use git log to count commits if git rev-list does not work as expected
COMMIT_COUNT=$($(git log origin/master..HEAD --oneline | wc -l) - 1)
COMMIT_COUNT=$(git log origin/master..HEAD --oneline | wc -l)
NEW_VERSION="${CURRENT_VERSION}-dev.${PR_NUMBER}.${COMMIT_COUNT}"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
else
echo "Failed to fetch master branch."
# Handle error or fallback scenario
fi
- name: Echo version and branch for testing
run: |
echo "Version to publish: $NEW_VERSION"
# Extract the branch name from the GitHub event payload
BRANCH_NAME=$(jq --raw-output .pull_request.head.ref $GITHUB_EVENT_PATH)
fi
- name: Echo version for testing
run: |
echo "Current branch: $BRANCH_NAME"
echo "Current branch: $(git branch --show-current)"
echo "Version to publish: $NEW_VERSION"

0 comments on commit 41dac20

Please sign in to comment.