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-19344] Allow projects to be named the same as any platform. #7021

Merged
merged 1 commit into from Aug 12, 2015
Merged
Changes from all commits
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
6 changes: 6 additions & 0 deletions iphone/cli/commands/_build.js
Expand Up @@ -1248,6 +1248,7 @@ iOSBuilder.prototype.validate = function (logger, config, cli) {
}

// make sure the app doesn't have any blacklisted directories or files in the Resources directory and warn about graylisted names
var platformsRegExp = /^(android|ios|iphone|ipad|mobileweb|blackberry|windows|tizen)$/;
this.blacklistDirectories.push(cli.tiapp.name);
[ path.join(this.projectDir, 'Resources'),
path.join(this.projectDir, 'Resources', 'iphone'),
Expand All @@ -1257,6 +1258,11 @@ iOSBuilder.prototype.validate = function (logger, config, cli) {
var lcaseFilename = filename.toLowerCase(),
isDir = fs.statSync(path.join(dir, filename)).isDirectory();

// if we have a platform resource dir, then this will not be copied and we should be ok
if (platformsRegExp.test(lcaseFilename)) {
return;
}

if (this.blacklistDirectories.indexOf(lcaseFilename) !== -1) {
if (isDir) {
logger.error(__('Found blacklisted directory in the Resources directory'));
Expand Down