Skip to content

Commit

Permalink
fix: windows travis setup (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheronfail committed Jan 4, 2019
1 parent 2712057 commit f54d88f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
30 changes: 22 additions & 8 deletions .travis.yml
@@ -1,6 +1,13 @@
language: rust
rust: nightly

sudo: false

notifications:
email:
on_success: never
on_failure: change

os:
- linux
- osx
Expand All @@ -16,19 +23,26 @@ cache:
addons:
apt:
packages:
- fakeroot
- rpm
- snapcraft
- flatpak-builder
- fakeroot
- rpm
homebrew:
packages:
- yarn

before_install:
- if [ $TRAVIS_OS_NAME = windows ]; then choco install nvm; fi
- nvm install lts/carbon
# Use NVS for Windows builds (easier to setup than NVM at the moment).
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then git clone --branch "v1.5.2" --depth 1 https://github.com/jasongin/nvs ~/.nvs; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then source ~/.nvs/nvs.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then nvs add lts/carbon; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then nvs use lts/carbon; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then choco install yarn; export PATH="/c/Program Files (x86)/Yarn/bin:$PATH"; fi
# Use NVM on linux and macos (comes pre-installed).
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then nvm install lts/carbon; fi

script:
- yarn
- yarn lint
- if test -z "$TRAVIS_TAG"; then travis_wait yarn make; fi
- if [ -n "$TRAVIS_TAG" ]; then travis_wait yarn make; fi

after_success:
- if test -n "$TRAVIS_TAG"; then yarn publish; fi
- if [ -n "$TRAVIS_TAG" ]; then yarn run publish; fi
2 changes: 1 addition & 1 deletion forge.config.js
Expand Up @@ -2,7 +2,7 @@ module.exports = {
make_targets: {
win32: ['squirrel'],
darwin: ['zip', 'dmg'],
linux: ['deb', 'rpm', 'flatpak']
linux: ['deb', 'rpm']
},
electronPackagerConfig: {
packageManager: 'yarn',
Expand Down

0 comments on commit f54d88f

Please sign in to comment.