From 8cbe7ec168cf4d400526ddb65ab1832af12fe00c Mon Sep 17 00:00:00 2001 From: Leonardo Merlin Date: Mon, 14 Sep 2015 13:19:31 -0300 Subject: [PATCH] Update env flags --- gulp/build.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gulp/build.js b/gulp/build.js index c01bf30..886b2f3 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -43,9 +43,13 @@ gulp.task('html', ['inject', 'partials'], function () { .pipe(assets = $.useref.assets()) .pipe($.rev()) .pipe(jsFilter) - .pipe($.if($.util.env.server === 'production', $.replace('$logProvider.debugEnabled(true);', '$logProvider.debugEnabled(false);'))) - .pipe($.if($.util.env.server === 'production', $.replace('http://hom.dialoga.gov.br', 'http://login.dialoga.gov.br'))) - .pipe($.if($.util.env.server === 'production', $.replace('http://hom.login.dialoga.gov.br', 'http://login.dialoga.gov.br'))) + // production + .pipe($.if($.util.env.production, $.replace('$logProvider.debugEnabled(true);', '$logProvider.debugEnabled(false);'))) + .pipe($.if($.util.env.production, $.replace('http://hom.dialoga.gov.br', 'http://login.dialoga.gov.br'))) + .pipe($.if($.util.env.production, $.replace('http://hom.login.dialoga.gov.br', 'http://login.dialoga.gov.br'))) + // staging + .pipe($.if($.util.env.staging, $.replace('http://dialoga.gov.br', 'http://hom.dialoga.gov.br'))) + .pipe($.if($.util.env.staging, $.replace('http://login.dialoga.gov.br', 'http://hom.login.dialoga.gov.br'))) .pipe($.ngAnnotate()) .pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify')) .pipe(jsFilter.restore()) -- libgit2 0.21.2