Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1718 from Execomsrl/ios-separation-environment-fix
Browse files Browse the repository at this point in the history
Fix bug on iOS platform occurring when application is built in releas…
  • Loading branch information
EddyVerbruggen authored Nov 5, 2020
2 parents 53dac31 + 27e766f commit 7ea80fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion publish/scripts/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -837,16 +837,21 @@ module.exports = function($logger, hookArgs) {
var isReleaseBuild = !!((hookArgs.checkForChangesOpts && hookArgs.checkForChangesOpts.projectChangesOptions) || hookArgs.prepareData).release;
var validProdEnvs = ['prod','production'];
var validStagingEnvs = ["dev", "development", "staging"];
var isStagingEnv = false;
var isProdEnv = false; // building with --env.prod or --env.production flag
var env = ((hookArgs.checkForChangesOpts && hookArgs.checkForChangesOpts.projectData && hookArgs.checkForChangesOpts.projectData.$options && hookArgs.checkForChangesOpts.projectData.$options.argv) || hookArgs.prepareData).env;
if (env) {
Object.keys(env).forEach((key) => {
if (validProdEnvs.indexOf(key)>-1) { isProdEnv=true; }
if (validStagingEnvs.indexOf(key) > -1) { isStagingEnv = true; }
});
}
var buildType = isReleaseBuild || isProdEnv ? 'production' : 'development';
var buildType = (isReleaseBuild && !isStagingEnv) || isProdEnv ? 'production' : 'development';
/*
Detect if we have nativescript-plugin-firebase temp file created during after-prepare hook, so we know
Expand Down

0 comments on commit 7ea80fe

Please sign in to comment.