Use automatic version when building snap directly

Make it easier to build a snap from your working copy by removing the
restriction of having to modify the version field first.
This commit is contained in:
Pierre Ossman 2022-09-14 10:13:09 +02:00
parent 69e0f0f5db
commit d5b8425d42
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ jobs:
- run: | - run: |
VERSION=$(grep '"version"' package.json | cut -d '"' -f 4) VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)
echo $VERSION echo $VERSION
sed -i "s/@VERSION@/$VERSION/g" snap/snapcraft.yaml sed -i "s/^version:.*/version: '$VERSION'/" snap/snapcraft.yaml
- uses: snapcore/action-build@v1 - uses: snapcore/action-build@v1
id: snapcraft id: snapcraft
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2

View File

@ -1,6 +1,6 @@
name: novnc name: novnc
base: core18 # the base snap is the execution environment for this snap base: core18 # the base snap is the execution environment for this snap
version: '@VERSION@' version: git
summary: Open Source VNC client using HTML5 (WebSockets, Canvas) summary: Open Source VNC client using HTML5 (WebSockets, Canvas)
description: | description: |
Open Source VNC client using HTML5 (WebSockets, Canvas). Open Source VNC client using HTML5 (WebSockets, Canvas).