microsoft / vsts-cordova-tasks

Streamline CI setup for your Apache Cordova, PhoneGap, Ionic, or Cordova CLI compatible app using a set of useful pre-defined build steps for VS Team Services or TFS
http://go.microsoft.com/fwlink/?LinkID=691188
Other
25 stars 27 forks source link

Custom Build Configurations #67

Closed jamesandersen closed 7 years ago

jamesandersen commented 7 years ago

My cordova project has some custom iOS build configurations (for different environments) which each specify different bundle IDs, product names, etc. When I enter one of these custom build configurations in the Configuration property of the Cordova Build task it appears to be ignored and Debug is used instead. image

I get an error which is expected because the wrong configuration was used... I include it here only because it shows that Debug was passed instead of PluginTest which is what I need in this scenario:

Error code 65 for command: xcodebuild with args: -xcconfig,/Users/vso113131/vsts-agent/_work/8/s/app/platforms/ios/cordova/build-debug.xcconfig,-workspace,MyApp.xcworkspace,-scheme,MyApp,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,MyApp.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/vso113131/vsts-agent/_work/8/s/app/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/vso113131/vsts-agent/_work/8/s/app/platforms/ios/build/sharedpch

Is there any way to force the use of a custom configuration that I've specified?

dpetrishin commented 7 years ago

Hi there. If you still didn't figure out or have this error, please follow my instructions. Add new variable, for example "customConfig" with your custom configuration name "PluginTest"

screen shot 2017-06-05 at 6 42 20 pm

After, link that variable to configuration textbox.

screen shot 2017-06-05 at 6 45 00 pm

Hope, that will help.

jamesandersen commented 7 years ago

@dmitriy-petrishin thanks for the response... we ended up doing a direct XCode build because of this issue but it's good information for future reference.

dpetrishin commented 7 years ago

@jamesandersen Sorry for late answer. I will try to push the suggestion of writing new article about custom configurations because there are not enough information about that.

dpetrishin commented 7 years ago

@jamesandersen I'm gonna close that issue. So if there will be some problems feel free to reopen.