Get app version from Cordova config.xml

How would I get a value such as app version from the config.xml for a Cordova app?

<widget id="com.apps.myapp" version="1.2.3">

I see the correct version from this element in the Apps and Artifacts page after a build so I think it should be possible.

Hey there @QubyMobile!

Please check out this thread: cordova - How do I get the version string I defined in the config.xml - Stack Overflow :slight_smile:

Thanks for the suggestion. I am not sure what to do with this, as I already have the version number displayed in my app.

I would like to name the build artifact filename in Bitrise using the version number found in the config.xml.

I need to somehow read it, and then put it into an environment variable in Bitrise so the next step can use it to name the output file.

I’ll try once more. In the output from Deploy-to-Bitrise-io step I see this:

Deploying files
Uploading apk file: /Users/vagrant/deploy/app-release-bitrise-signed.apk
analyzing apk
apk infos: map[app_name:Toon min_sdk_version:21 package_name:[REDACTED] version_code:64090 version_name:3.63.2]
creating artifact
file size: 4MB
uploading artifact
finishing artifact

version_name.apk and version_name.ipa is what I would like to use to name the uploaded files, it seems strange that this value is not available.

toon.3.63.2.apk, toon.3.63.2.ipa

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.