From ba2ce406d1fac05594b203fbc74db136820f2912 Mon Sep 17 00:00:00 2001 From: Susan Tan Date: Thu, 19 Sep 2019 11:38:52 -0700 Subject: [PATCH] (#659) Remove CONFIGURATION_BUILD_DIR default string Use the user custom defined CONFIGURATION_BUILD_DIR as the default and if undefined, then the value is an empty string. --- bin/templates/scripts/cordova/lib/build.js | 4 ++-- tests/spec/unit/build.spec.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/templates/scripts/cordova/lib/build.js b/bin/templates/scripts/cordova/lib/build.js index f8d301dfd8..6a5815d1d3 100644 --- a/bin/templates/scripts/cordova/lib/build.js +++ b/bin/templates/scripts/cordova/lib/build.js @@ -348,7 +348,7 @@ function getXcodeBuildArgs (projectName, projectPath, configuration, isDevice, b ]; buildActions = [ 'archive' ]; settings = [ - customArgs.configuration_build_dir || 'CONFIGURATION_BUILD_DIR=' + path.join(projectPath, 'build', 'device'), + customArgs.configuration_build_dir || '', customArgs.shared_precomps_dir || 'SHARED_PRECOMPS_DIR=' + path.join(projectPath, 'build', 'sharedpch') ]; // Add other matched flags to otherFlags to let xcodebuild present an appropriate error. @@ -370,7 +370,7 @@ function getXcodeBuildArgs (projectName, projectPath, configuration, isDevice, b ]; buildActions = [ 'build' ]; settings = [ - customArgs.configuration_build_dir || 'CONFIGURATION_BUILD_DIR=' + path.join(projectPath, 'build', 'emulator'), + customArgs.configuration_build_dir || '', customArgs.shared_precomps_dir || 'SHARED_PRECOMPS_DIR=' + path.join(projectPath, 'build', 'sharedpch') ]; // Add other matched flags to otherFlags to let xcodebuild present an appropriate error. diff --git a/tests/spec/unit/build.spec.js b/tests/spec/unit/build.spec.js index 4323611534..e0d52f54a6 100644 --- a/tests/spec/unit/build.spec.js +++ b/tests/spec/unit/build.spec.js @@ -55,7 +55,7 @@ describe('build', function () { '-archivePath', 'TestProjectName.xcarchive', 'archive', - 'CONFIGURATION_BUILD_DIR=' + path.join(testProjectPath, 'build', 'device'), + '', 'SHARED_PRECOMPS_DIR=' + path.join(testProjectPath, 'build', 'sharedpch') ]); expect(args.length).toEqual(13); @@ -109,7 +109,7 @@ describe('build', function () { '-archivePath', 'TestProjectName.xcarchive', 'archive', - 'CONFIGURATION_BUILD_DIR=' + path.join(testProjectPath, 'build', 'device'), + '', 'SHARED_PRECOMPS_DIR=' + path.join(testProjectPath, 'build', 'sharedpch') ]); expect(args.length).toEqual(13); @@ -131,7 +131,7 @@ describe('build', function () { '-destination', 'platform=iOS Simulator,name=iPhone 5s', 'build', - 'CONFIGURATION_BUILD_DIR=' + path.join(testProjectPath, 'build', 'emulator'), + '', 'SHARED_PRECOMPS_DIR=' + path.join(testProjectPath, 'build', 'sharedpch') ]); expect(args.length).toEqual(13); @@ -155,7 +155,7 @@ describe('build', function () { '-archivePath', 'TestProjectName.xcarchive', 'archive', - 'CONFIGURATION_BUILD_DIR=' + path.join(testProjectPath, 'build', 'device'), + '', 'SHARED_PRECOMPS_DIR=' + path.join(testProjectPath, 'build', 'sharedpch'), '-sdk', 'TestSdkFlag' @@ -181,7 +181,7 @@ describe('build', function () { '-destination', 'platform=iOS Simulator,name=iPhone 5s', 'build', - 'CONFIGURATION_BUILD_DIR=' + path.join(testProjectPath, 'build', 'emulator'), + '', 'SHARED_PRECOMPS_DIR=' + path.join(testProjectPath, 'build', 'sharedpch'), '-archivePath', 'TestArchivePathFlag' @@ -206,7 +206,7 @@ describe('build', function () { 'TestProjectName.xcarchive', '-allowProvisioningUpdates', 'archive', - 'CONFIGURATION_BUILD_DIR=' + path.join(testProjectPath, 'build', 'device'), + '', 'SHARED_PRECOMPS_DIR=' + path.join(testProjectPath, 'build', 'sharedpch') ]); expect(args.length).toEqual(14);