From d1336783d84bfae85fcc9ef7d8f1c3120a08487c Mon Sep 17 00:00:00 2001 From: Michael Knoch Date: Sun, 10 Apr 2016 20:57:15 +0200 Subject: [PATCH] use environment vars --- gulpfile.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 10aa524..8d1fe76 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,19 +7,8 @@ const webserver = require('gulp-webserver'); const watch = require('gulp-watch'); const KarmaServer = require('karma').Server; const shell = require('gulp-shell'); -const fs = require('fs'); const bump = require('gulp-bump'); -var env = {}; - -fs.exists('./env.json', function (exists) { - if (exists) { - env = JSON.parse(fs.readFileSync('./env.json', 'utf-8')); - } else { - env.token = ''; - env.identity = ''; - } -}); gulp.task('clean', function () { return del('dist/**/*'); @@ -68,8 +57,8 @@ gulp.task('test', ['build'], function (done) { gulp.task('deploy', ['bump'], shell.task([ 'rm -rf Locator-darwin-x64', './node_modules/.bin/electron-packager . Locator --platform=darwin --arch=x64 --ignore "node_modules/remap-istanbul" --ignore "node_modules/gulp-*" --ignore "node_modules/http-server" --ignore "node_modules/karma-*" --ignore "node_modules/electron-*" --ignore "node_modules/jasmine-*" --ignore "node_modules/lite-server" --overwrite', - 'codesign --deep --force --verbose --sign ' + env.identity + ' Locator-darwin-x64/Locator.app', - './node_modules/.bin/electron-release --app Locator-darwin-x64/Locator.app --token ' + env.token + ' --repo locator-kn/dashboard' + 'codesign --deep --force --verbose --sign ' + process.env.identity + ' Locator-darwin-x64/Locator.app', + './node_modules/.bin/electron-release --app Locator-darwin-x64/Locator.app --token ' + process.env.token + ' --repo locator-kn/dashboard' ])); gulp.task('bump', function () {