From 693a59809e606dfddcf9d7e77c8486debebd11a5 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 3 May 2017 16:58:57 -0700 Subject: [PATCH] Fix setting environment var on windows Use platform-specific commands to set NODE_ENV after yarn install but before yarn travis-build. // FREEBIE --- .travis.yml | 1 + appveyor.yml | 1 + package.json | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 97bc6b5c7..921546b97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ dist: trusty install: - yarn install script: + - export NODE_ENV=production - yarn test - yarn travis-build env: diff --git a/appveyor.yml b/appveyor.yml index c0646838b..5f199887e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,4 +14,5 @@ test_script: - yarn test build_script: + - set NODE_ENV=production - yarn travis-build diff --git a/package.json b/package.json index 87c91c859..8dcd91a8c 100644 --- a/package.json +++ b/package.json @@ -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",