Skip to content

Commit

Permalink
Set a git version number on most builds
Browse files Browse the repository at this point in the history
If it isn't a release then it is some form of development build and
should have a version that reflects that.
  • Loading branch information
CendioOssman committed Nov 9, 2021
1 parent c2980d1 commit 99cf540
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ jobs:
GITREV=$(git rev-parse --short HEAD)
echo $GITREV
sed -i "s/^\(.*\"version\".*\)\"\([^\"]\+\)\"\(.*\)\$/\1\"\2-g$GITREV\"\3/" package.json
if: |
github.event_name == 'push' &&
github.event.ref == 'refs/heads/master'
if: github.event_name != 'release'
- uses: actions/setup-node@v1
with:
# Needs to be explicitly specified for auth to work
Expand Down Expand Up @@ -56,9 +54,7 @@ jobs:
GITREV=$(git rev-parse --short HEAD)
echo $GITREV
sed -i "s/^\(.*\"version\".*\)\"\([^\"]\+\)\"\(.*\)\$/\1\"\2-g$GITREV\"\3/" package.json
if: |
github.event_name == 'push' &&
github.event.ref == 'refs/heads/master'
if: github.event_name != 'release'
- run: |
VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)
echo $VERSION
Expand Down

0 comments on commit 99cf540

Please sign in to comment.