Commit 8cbe7ec168cf4d400526ddb65ab1832af12fe00c

Authored by Leonardo Merlin
1 parent a10745b3

Update env flags

Showing 1 changed file with 7 additions and 3 deletions   Show diff stats
gulp/build.js
... ... @@ -43,9 +43,13 @@ gulp.task('html', ['inject', 'partials'], function () {
43 43 .pipe(assets = $.useref.assets())
44 44 .pipe($.rev())
45 45 .pipe(jsFilter)
46   - .pipe($.if($.util.env.server === 'production', $.replace('$logProvider.debugEnabled(true);', '$logProvider.debugEnabled(false);')))
47   - .pipe($.if($.util.env.server === 'production', $.replace('http://hom.dialoga.gov.br', 'http://login.dialoga.gov.br')))
48   - .pipe($.if($.util.env.server === 'production', $.replace('http://hom.login.dialoga.gov.br', 'http://login.dialoga.gov.br')))
  46 + // production
  47 + .pipe($.if($.util.env.production, $.replace('$logProvider.debugEnabled(true);', '$logProvider.debugEnabled(false);')))
  48 + .pipe($.if($.util.env.production, $.replace('http://hom.dialoga.gov.br', 'http://login.dialoga.gov.br')))
  49 + .pipe($.if($.util.env.production, $.replace('http://hom.login.dialoga.gov.br', 'http://login.dialoga.gov.br')))
  50 + // staging
  51 + .pipe($.if($.util.env.staging, $.replace('http://dialoga.gov.br', 'http://hom.dialoga.gov.br')))
  52 + .pipe($.if($.util.env.staging, $.replace('http://login.dialoga.gov.br', 'http://hom.login.dialoga.gov.br')))
49 53 .pipe($.ngAnnotate())
50 54 .pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify'))
51 55 .pipe(jsFilter.restore())
... ...