diff options
author | Pierre Ossman <ossman@cendio.se> | 2020-12-30 16:13:52 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2020-12-30 16:13:52 +0100 |
commit | 4a319c414da3a5e47dd3974ad3b859396ab7ac51 (patch) | |
tree | 8da415b7558c87a829df4ce9267da63f99be9576 | |
parent | 6784bb312f8cea2104b39adde1cce8246114e415 (diff) | |
parent | adfb99e7ecd8e4ae77ae76a4e24c1e4c41520982 (diff) | |
download | novnc-4a319c414da3a5e47dd3974ad3b859396ab7ac51.tar.gz |
Merge branch 'more_noie' of https://github.com/CendioOssman/noVNC
-rw-r--r-- | .github/workflows/deploy.yml | 45 | ||||
-rw-r--r-- | docs/EMBEDDING.md | 18 | ||||
-rw-r--r-- | docs/LIBRARY.md | 10 | ||||
-rw-r--r-- | snap/snapcraft.yaml | 18 |
4 files changed, 46 insertions, 45 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 454ff8b..6b0ac96 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,8 @@ name: Publish on: + push: + pull_request: release: types: [published] @@ -14,36 +16,41 @@ jobs: # Needs to be explicitly specified for auth to work registry-url: 'https://registry.npmjs.org' - run: npm install + - uses: actions/upload-artifact@v2 + with: + name: npm + path: lib - run: npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ !github.event.release.prerelease }} + if: ${{ github.event_name == 'release' && !github.event.release.prerelease }} - run: npm publish --access public --tag beta env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ github.event.release.prerelease }} + if: ${{ github.event_name == 'release' && 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 }} + - uses: snapcore/action-build@v1 + id: snapcraft + - uses: actions/upload-artifact@v2 + with: + name: snap + path: ${{ steps.snapcraft.outputs.snap }} + - uses: snapcore/action-publish@v1 + with: + store_login: ${{ secrets.SNAPCRAFT_LOGIN }} + snap: ${{ steps.build.outputs.snap }} + release: stable + if: ${{ github.event_name == 'release' && !github.event.release.prerelease }} + - uses: snapcore/action-publish@v1 + with: + store_login: ${{ secrets.SNAPCRAFT_LOGIN }} + snap: ${{ steps.build.outputs.snap }} + release: beta + if: ${{ github.event_name == 'release' && github.event.release.prerelease }} diff --git a/docs/EMBEDDING.md b/docs/EMBEDDING.md index 6a5dcd8..1050014 100644 --- a/docs/EMBEDDING.md +++ b/docs/EMBEDDING.md @@ -71,24 +71,6 @@ query string. Currently the following options are available: * `logging` - The console log level. Can be one of `error`, `warn`, `info` or `debug`. -## Pre-conversion of Modules - -noVNC is written using ECMAScript 6 modules. Many of the major browsers support -these modules natively, but not all. By default the noVNC application includes -a script that can convert these modules to an older format as they are being -loaded. However this process can be slow and severely increases the load time -for the application. - -It is possible to perform this conversion ahead of time, avoiding the extra -load times. To do this please follow these steps: - - 1. Install Node.js - 2. Run `npm install` in the noVNC directory - 3. Run `./utils/use_require.js --with-app --as commonjs` - -This will produce a `build/` directory that includes everything needed to run -the noVNC application. - ## HTTP Serving Considerations ### Browser Cache Issue diff --git a/docs/LIBRARY.md b/docs/LIBRARY.md index 63f55e8..3890bb2 100644 --- a/docs/LIBRARY.md +++ b/docs/LIBRARY.md @@ -18,18 +18,14 @@ do things. ## Conversion of Modules -noVNC is written using ECMAScript 6 modules. Many of the major browsers support -these modules natively, but not all. They are also not supported by Node.js. To -use noVNC in these places the library must first be converted. +noVNC is written using ECMAScript 6 modules. This is not supported by older +versions of Node.js. To use noVNC with those older versions of Node.js the +library must first be converted. Fortunately noVNC includes a script to handle this conversion. Please follow the following steps: 1. Install Node.js 2. Run `npm install` in the noVNC directory - 3. Run `./utils/use_require.js --as <module format>` - -Several module formats are available. Please run -`./utils/use_require.js --help` to see them all. The result of the conversion is available in the `lib/` directory. diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 94886d4..b5b26a0 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -13,8 +13,24 @@ confinement: strict parts: novnc: - source: build/ + source: . plugin: dump + organize: + utils/launch.sh: / + stage: + - vnc.html + - app + - core/**/*.js + - vendor/**/*.js + - launch.sh + stage-packages: + - bash + + svc-script: + source: snap/local + plugin: dump + stage: + - svc_wrapper.sh stage-packages: - bash - jq |