Skip to content

Commit

Permalink
Windows bash
Browse files Browse the repository at this point in the history
  • Loading branch information
mmosca committed Dec 25, 2023
1 parent bef472a commit bbc575a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/<n>/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:
Expand Down

0 comments on commit bbc575a

Please sign in to comment.