From bbc575a390a842c1eb9c4124676d8d268327f704 Mon Sep 17 00:00:00 2001 From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com> Date: Mon, 25 Dec 2023 20:22:38 +0100 Subject: [PATCH] Windows bash --- .github/workflows/build.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9a0a4cc24..965b7ee24 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -127,16 +127,17 @@ jobs: run: | # This is the hash of the commit for the PR # when the action is triggered by PR, empty otherwise - set COMMIT_ID=${{ github.event.pull_request.head.sha }} + COMMIT_ID=${{ github.event.pull_request.head.sha }} # This is the hash of the commit when triggered by push # but the hash of refs/pull//merge, which is different # from the hash of the latest commit in the PR, that's # why we try github.event.pull_request.head.sha first - set COMMIT_ID=${COMMIT_ID:-${{ github.sha }}} - set BUILD_SUFFIX=ci-$(date '+%Y%m%d')-$(git rev-parse --short ${COMMIT_ID}) - set VERSION=$(grep version package.json | sed 's/.*"\([0-9][0-9]*.[0-9]*.[0-9]*\)".*/\1/g') + COMMIT_ID=${COMMIT_ID:-${{ github.sha }}} + BUILD_SUFFIX=ci-$(date '+%Y%m%d')-$(git rev-parse --short ${COMMIT_ID}) + VERSION=$(grep version package.json | sed 's/.*"\([0-9][0-9]*.[0-9]*.[0-9]*\)".*/\1/g') echo "BUILD_SUFFIX=${BUILD_SUFFIX}" >> $GITHUB_ENV echo "BUILD_NAME=inav-configurator-${VERSION}-${BUILD_SUFFIX}" >> $GITHUB_ENV + shell: bash - uses: actions/setup-node@v4 with: