diff options
author | Pierre Ossman <ossman@cendio.se> | 2021-11-09 16:23:14 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2021-11-09 16:32:49 +0100 |
commit | 99cf540e1aee2f986443b82608a78079b95ded39 (patch) | |
tree | ddadc2babb4b09b2b2e5cd6c32ae120e5ccf969e | |
parent | c2980d15e938c3759da9e6d1ca1775c27d97fc62 (diff) | |
download | novnc-99cf540e1aee2f986443b82608a78079b95ded39.tar.gz |
Set a git version number on most builds
If it isn't a release then it is some form of development build and
should have a version that reflects that.
-rw-r--r-- | .github/workflows/deploy.yml | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a1ddfd9..31601c7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 @@ -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 |