Fix setting environment var on windows

Use platform-specific commands to set NODE_ENV after yarn install but
before yarn travis-build.

// FREEBIE
This commit is contained in:
lilia 2017-05-03 16:58:57 -07:00 committed by Scott Nonnenberg
parent 81d8b78d05
commit 693a59809e
No known key found for this signature in database
GPG Key ID: A4931C09644C654B
3 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ dist: trusty
install:
- yarn install
script:
- export NODE_ENV=production
- yarn test
- yarn travis-build
env:

View File

@ -14,4 +14,5 @@ test_script:
- yarn test
build_script:
- set NODE_ENV=production
- yarn travis-build

View File

@ -35,7 +35,7 @@
"test": "grunt test",
"lint": "grunt jshint",
"start": "electron .",
"travis-build": "npm run icon-gen && grunt && NODE_ENV=production build --em.environment=$NODE_ENV --config.mac.bundleVersion='$TRAVIS_BUILD_NUMBER'",
"travis-build": "npm run icon-gen && grunt && build --em.environment=$NODE_ENV --config.mac.bundleVersion='$TRAVIS_BUILD_NUMBER'",
"dist": "npm run icon-gen && grunt && build --em.environment=$NODE_ENV",
"pack": "npm run dist -- --dir",
"pack-staging": "NODE_ENV=staging npm run pack",