Hi Team!!
I have a cordova project with ios and android builds. Build, compile and archive files are ok.
The problem is that the BITRISE_APK_PATH variable is not being written and consequently the “deploy to bitrise step” is not uploading and creating the apk install page.
I believe it’s a bug in the archive step, because I have another project that uses the Ionic Archive 1.1.0 and the variable is writen correctly and the upload / install page works.
Attached is a printscreen comparing the two.
Help!
1 Like
Hi @ipirangamobile,
Thanks for reporting and sorry for the inconvenience!
This seems to be a duplicate of https://github.com/bitrise-community/steps-cordova-archive/issues/13
A PR with a fix is already in-review: https://github.com/bitrise-community/steps-cordova-archive/pull/15
If you’d have any questions just let us know!
Tks @viktorbenei.
I’ll wait for the correction.
As a workaround, manually created the variable $BITRISE_APK_PATH
in tab “env vars” with $BITRISE_DEPLOY_DIR/android-release.apk
content.
In my workflow, after the archive step, I put in a “Script step”, with a manual copy of the APK.
It’s ugly, but it worked
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
# write your script here
echo "Hello World!"
cp "$BITRISE_SOURCE_DIR/platforms/android/build/outputs/apk/release/android-release.apk" "$BITRISE_APK_PATH"
1 Like
@ipirangamobile thanks for sharing the script!
It’s definitely a “good workaround” for now - the step update is coming really soon, we’re working on it as we speak
P.S.: I made a couple of “cleanups” on your Script in your comment, to make it a bit more “future proof”, I hope you don’t mind