Fix and upload snaps on travis
This commit is contained in:
10
.travis.yml
10
.travis.yml
@@ -1,5 +1,11 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
provider: snap
|
||||||
|
snap: build/clean/build/*.snap
|
||||||
|
channel: edge
|
||||||
|
skip_cleanup: true
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- xvfb
|
- xvfb
|
||||||
|
|
||||||
@@ -24,6 +30,7 @@ services:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
- yarn install
|
- yarn install
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update && sudo apt-get -y install snap squashfs-tools && sudo snap install snapcraft --classic; fi;
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build docker --tag uitest; fi;
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build docker --tag uitest; fi;
|
||||||
|
|
||||||
script:
|
script:
|
||||||
@@ -31,6 +38,7 @@ script:
|
|||||||
- yarn test
|
- yarn test
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run -e GH_TOKEN=$GH_TOKEN -e GIT_TAG=$TRAVIS_TAG --rm -v `pwd`:/app uitest sh -c "cd app && docker/testMounted.sh"; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run -e GH_TOKEN=$GH_TOKEN -e GIT_TAG=$TRAVIS_TAG --rm -v `pwd`:/app uitest sh -c "cd app && docker/testMounted.sh"; fi
|
||||||
- if [[ "$TRAVIS_TAG" != "" ]]; then yarn run prepare-release; fi
|
- if [[ "$TRAVIS_TAG" != "" ]]; then yarn run prepare-release; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package -- linux; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package linux; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package snap; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package -- mac; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package -- mac; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package -- win; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package -- win; fi
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default async function (info: any) {
|
|||||||
await exec('sudo', ['unsquashfs', snapFile])
|
await exec('sudo', ['unsquashfs', snapFile])
|
||||||
await fs.remove(snapFile)
|
await fs.remove(snapFile)
|
||||||
await exec('sudo', ['chmod', '-R', 'g-s', 'squashfs-root'])
|
await exec('sudo', ['chmod', '-R', 'g-s', 'squashfs-root'])
|
||||||
await exec('sudo', ['snapcraft', 'pack', 'squashfs-root', '--output', snapFile])
|
await exec('sudo', ['snap', 'run', 'snapcraft', 'pack', 'squashfs-root', '--output', snapFile])
|
||||||
await fs.remove('squashfs-root')
|
await fs.remove('squashfs-root')
|
||||||
|
|
||||||
chdir(originalDir)
|
chdir(originalDir)
|
||||||
|
|||||||
Reference in New Issue
Block a user