From 7a8d23ba8476754a0f8dadf0f72c388819303498 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 18 Apr 2017 12:33:21 -0400 Subject: [PATCH] rework configs to accomedate preview env --- gulpfile.js | 13 +++++++++++-- package.json | 4 ++-- settings.Preview.json | 5 +++++ src/app/settings.js | 2 +- 4 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 settings.Preview.json diff --git a/gulpfile.js b/gulpfile.js index 52aa06a9009..c9a261b7c9b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -214,9 +214,9 @@ function config() { constants: _.merge({}, { appSettings: { version: project.version, - environment: project.production ? 'Production' : 'Development' + environment: project.env } - }, require('./settings' + (project.production ? '.Production' : '') + '.json') || {}) + }, require('./settings.' + project.env + '.json') || {}) })); } @@ -377,6 +377,15 @@ gulp.task('deploy', ['dist'], function () { .pipe(ghPages({ cacheDir: paths.dist + '.publish' })); }); +gulp.task('deploy-preview', ['dist'], function () { + return gulp.src(paths.dist + '**/*') + .pipe(ghPages({ + cacheDir: paths.dist + '.publish', + remoteUrl: 'git@github.com:bitwarden/web-preview.git', + origin: 'preview' + })); +}); + gulp.task('serve', function () { connect.server({ port: 4001, diff --git a/package.json b/package.json index 66d0517a5ed..d73f8c8da2f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bitwarden", - "version": "1.9.1", - "production": true, + "version": "1.10.0", + "env": "Production", "devDependencies": { "connect": "3.6.0", "lodash": "4.17.4", diff --git a/settings.Preview.json b/settings.Preview.json new file mode 100644 index 00000000000..bc044968e8e --- /dev/null +++ b/settings.Preview.json @@ -0,0 +1,5 @@ +{ + "appSettings": { + "apiUri": "https://preview.api.bitwarden.com" + } +} diff --git a/src/app/settings.js b/src/app/settings.js index 5ebf43a1743..6599bf5f89d 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -1,2 +1,2 @@ angular.module("bit") -.constant("appSettings", {"apiUri":"https://api.bitwarden.com","version":"1.9.1","environment":"Production"}); +.constant("appSettings", {"apiUri":"https://api.bitwarden.com","version":"1.10.0","environment":"Production"});