Reputation: 2140
Is there a way to specify the name of the built output file for Apache cordova builds?
I can't see any option to specify the output filename/path in cordova build <platform>
.
Upvotes: 3
Views: 2357
Reputation: 4148
One way you could achieve this would be to use an after build hook, and write a small script to rename the .ipa or .apk appropriately.
You could configure separate hook scripts for each platform, and have the script rename the default .ipa and .apk names to the one you want to use.
To set up separate after build hooks for iOS and Android, you'd add something like this to config.xml (As you tagged this Visual Studio I'm assuming you're running Windows so used .bat script file extensions but any scripting will do - I usually use Node or Python):
<platform name="android">
<hook type="after_build" src="path/to/android_scriptname.bat" />
</platform>
<platform name="ios">
<hook type="after_build" src="path/to/ios_scriptname.bat" />
</platform>
Upvotes: 3