This commit is contained in:
Pierre Ossman 2020-07-03 16:06:08 +02:00
commit 72ca470750
4 changed files with 39 additions and 8 deletions

View File

@ -5,7 +5,7 @@ on:
types: [published] types: [published]
jobs: jobs:
build: npm:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -14,3 +14,33 @@ jobs:
- run: npm publish --access public - run: npm publish --access public
env: env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ !github.event.release.prerelease }}
- run: npm publish --access public --tag beta
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ github.event.release.prerelease }}
snap:
runs-on: ubuntu-latest
container: snapcore/snapcraft
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm install
- run: ./utils/use_require.js --clean --as commonjs --with-app
- run: |
cp utils/launch.sh build/launch.sh
cp snap/local/svc_wrapper.sh build/svc_wrapper.sh
- run: |
VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)
echo $VERSION
sed -i "s/@VERSION@/$VERSION/g" snap/snapcraft.yaml
- run: snapcraft
- run: |
mkdir .snapcraft
echo ${SNAPCRAFT_LOGIN} | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg
env:
SNAPCRAFT_LOGIN: ${{secrets.SNAPCRAFT_LOGIN}}
- run: snapcraft push --release=stable *.snap
if: ${{ !github.event.release.prerelease }}
- run: snapcraft push --release=beta *.snap
if: ${{ github.event.release.prerelease }}

View File

@ -1 +0,0 @@
1.1.0

View File

@ -24,6 +24,6 @@ snapctl get services | jq -c '.[]' | while read service; do # for each service t
echo "novnc: not starting service ${service} with listen_port ${listen_port} and vnc_host_port ${vnc_host_port}" echo "novnc: not starting service ${service} with listen_port ${listen_port} and vnc_host_port ${vnc_host_port}"
else else
# start (and fork with '&') the service using the specified listen port and VNC host:port # start (and fork with '&') the service using the specified listen port and VNC host:port
$SNAP/utils/launch.sh --listen $listen_port --vnc $vnc_host_port & $SNAP/launch.sh --listen $listen_port --vnc $vnc_host_port &
fi fi
done done

View File

@ -1,17 +1,19 @@
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: '1.1.0' version: '@VERSION@'
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).
noVNC is both a VNC client JavaScript library as well as an application built on top of that library. noVNC runs well in any modern browser including mobile browsers (iOS and Android). noVNC is both a VNC client JavaScript library as well as an
application built on top of that library. noVNC runs well in any
modern browser including mobile browsers (iOS and Android).
grade: stable grade: stable
confinement: strict confinement: strict
parts: parts:
novnc: novnc:
source: https://github.com/novnc/noVNC.git #https://github.com/novnc/noVNC/archive/v$SNAPCRAFT_PROJECT_VERSION.tar.gz source: build/
plugin: dump plugin: dump
stage-packages: stage-packages:
- websockify - websockify
@ -26,9 +28,9 @@ hooks:
apps: apps:
novnc: novnc:
command: utils/launch.sh command: ./launch.sh
plugs: [network, network-bind] plugs: [network, network-bind]
novncsvc: novncsvc:
command: utils/svc_wrapper.sh command: ./svc_wrapper.sh
daemon: forking daemon: forking
plugs: [network, network-bind] plugs: [network, network-bind]