From 41dac205be634852477dbe2762b9f597455e024e Mon Sep 17 00:00:00 2001 From: ryanformio Date: Tue, 19 Mar 2024 11:45:04 -0500 Subject: [PATCH] show current branch --- .github/workflows/repo.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/repo.yml b/.github/workflows/repo.yml index 4ec8f628..5ae99f36 100644 --- a/.github/workflows/repo.yml +++ b/.github/workflows/repo.yml @@ -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" \ No newline at end of file