Closed pantos27 closed 3 years ago
The API response is actually stored in a JSON file intended for this purpose: build/outputs/internal-sharing/bundle/release/1610051836596.json
. (The number is a timestamp, you can just sort descending and pick the first one.) It looks like this:
{
"certificateFingerprint" : "",
"downloadUrl" : "",
"sha256" : ""
}
Does that work? I'd rather not put stuff in an envar because other people might want the other fields and naming is hard. :) Gonna update the docs though.
can use a custom var name like GPP_DOWNLOAD_URL
Yes, but no. :) Download url to what? And what if people have multiple apps in one build, does the envar get overwritten, or do we have one per app? What if someone wants to upload both an APK and bundle private artifact? Etc etc. Envars are the wrong abstractions for this.
Since it sounds like you want to pass the url to some other program, it should be pretty easy to use jq: https://stedolan.github.io/jq/.
Problem description
Right now when running
uploadReleasePrivateBundle
oruploadReleasePrivateApk
the download url is only written in the log output to the console. This is problematic when running this task in CI machines since it needs to be shared and distributed in an automated process.Potential solutions/workarounds
Export the download url to an environment variable at the end of the process