2021-05-04 12:48:39 +02:00
#!/bin/sh
2019-10-01 00:07:07 +02:00
echo Uploading to Appetize and publishing link to Github...
2021-05-04 12:48:39 +02:00
echo "Branch "
2021-01-18 17:00:15 +01:00
BRANCH = ` git ls-remote --heads origin | grep $( git rev-parse HEAD) | cut -d / -f 3`
echo $BRANCH
2021-05-04 12:48:39 +02:00
echo "Branch 2 "
2019-10-01 21:32:02 +02:00
git log -n 1 --pretty= %d HEAD | awk '{print $2}' | sed 's/origin\///' | sed 's/)//'
2019-10-01 00:07:07 +02:00
FILENAME = " $APPCENTER_OUTPUT_DIRECTORY /app-release.apk "
if [ -f $FILENAME ] ; then
APTZ = ` curl " https:// $APPETIZE @api.appetize.io/v1/apps " -F " file=@ $FILENAME " -F "platform=android" `
echo Apptezize response:
echo $APTZ
2021-04-27 21:53:44 +02:00
APPURL = ` node -e " let e = JSON.parse(' $APTZ '); console.log(e.publicURL + '?device=pixel4'); " `
2019-10-01 00:07:07 +02:00
echo App url: $APPURL
2020-05-19 19:16:30 +02:00
PR = ` node scripts/appcenter-post-build-get-pr-number.js`
2019-10-01 00:07:07 +02:00
echo PR: $PR
2019-12-24 00:25:40 +01:00
2021-06-29 21:19:54 +02:00
DLOAD_APK = " https://lambda-download-android-build.herokuapp.com/download/ $BUILD_BUILDID "
2019-12-24 00:25:40 +01:00
2023-12-28 23:18:15 +01:00
curl -X POST --data " {\"body\":\"♫ This was a triumph. I'm making a note here: HUGE SUCCESS ♫\n\n [android in browser] $APPURL \n\n[download apk]( $DLOAD_APK ) \"} " -H " Authorization: Bearer $GITHUB " " https://api.github.com/repos/BlueWallet/BlueWallet/issues/ $PR /comments "
2019-10-01 00:07:07 +02:00
fi