Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-24798] Fixed bug where the output directory was being deleted … #9365

Merged
merged 2 commits into from
Aug 28, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3879,8 +3879,9 @@ iOSBuilder.prototype.writeInfoPlist = function writeInfoPlist() {
});
return true;
}
});
});
return false;
}, this);
}, this);

if (this.enableLaunchScreenStoryboard) {
plist.UILaunchStoryboardName = 'LaunchScreen';
Expand Down
13 changes: 8 additions & 5 deletions iphone/cli/hooks/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,15 @@ exports.init = function (logger, config, cli) {
}

// make sure the output directory is good to go
if (fs.existsSync(outputDir)) {
logger.info(__('Deleting dist directory: %s', outputDir.cyan));
wrench.rmdirSyncRecursive(outputDir);
if (!fs.existsSync(outputDir)) {
wrench.mkdirSyncRecursive(outputDir);
}

const ipaFile = path.join(outputDir, builder.tiapp.name + '.ipa');
if (fs.existsSync(ipaFile)) {
logger.debug(__('Deleting old .ipa file'));
fs.unlinkSync(ipaFile);
}
wrench.mkdirSyncRecursive(outputDir);
var ipaFile = path.join(outputDir, builder.tiapp.name + '.ipa');

var exportsOptionsPlistFile = path.join(builder.buildDir, 'export_options.plist');
var exportsOptions = new appc.plist();
Expand Down