I am setting up circle CI for the first time. I am trying to write a script to upload the apk to hockeyapp after the build is done. I read some threads here and came up with this code for my script
curl \
-F "status=2" \
-F "notify=0" \
-F "ipa=@/root/code/app/build/outputs/apk/release/app-universal-release-unsigned.apk" \
-H "X-HockeyAppToken: $HockeyAppToken" \
https://rink.hockeyapp.net/api/2/apps/upload
However, Circle CI complains that the path is not correct
curl: (26) couldn’t open file “/root/code/app/build/outputs/apk/release/app-universal-release-unsigned.apk”
Exited with code 26
Is there a way I can know the exact location of the android apk created by Circle CI?
Also, I want to upload the apk to hockeyapp only for the master branch and release branches matching the name release/
. Will the below code work for that?
if [ "${CIRCLE_BRANCH}" == "release/*" ] || [ "${CIRCLE_BRANCH}" == "master" ];
then sh hockey_deploy.sh;
fi
Thank you!