diff options
author | Allan Wang <me@allanwang.ca> | 2017-08-07 14:56:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-07 14:56:48 -0700 |
commit | ab7ec131b62ac1567e983c846c921bd3ada11dd4 (patch) | |
tree | 1e9e7db2151ba531f438a2ac9c4fc960c913dc46 /generate-apk-release.sh | |
parent | 7746e63373c905faa6d7e45e45fffc48d3ffff85 (diff) | |
download | frost-ab7ec131b62ac1567e983c846c921bd3ada11dd4.tar.gz frost-ab7ec131b62ac1567e983c846c921bd3ada11dd4.tar.bz2 frost-ab7ec131b62ac1567e983c846c921bd3ada11dd4.zip |
Fix/2FA (#115)
* Create basis for downloading videos
* Resolve some download errors and allow video to be opened in external apps
* Remove url checks for loging
* Update readme with build links
* Allow for all apks to build
* Fix travis apk uploads
* Fix null mapping
* Fix some notation
* Add commit message to test builds
* Remove faulty commit from test release
* Add intent overriding to login web client
* Add resource logging
* Add intent verification without url check
* Simplify login activity
* Check start activity for result
* Add check before resolving intent
* Fix wrong index
* Temporary fix for 2FA login with U2F (#116)
* Clean up and add comments
Diffstat (limited to 'generate-apk-release.sh')
-rw-r--r-- | generate-apk-release.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/generate-apk-release.sh b/generate-apk-release.sh index 830fa07d..6d1c868c 100644 --- a/generate-apk-release.sh +++ b/generate-apk-release.sh @@ -3,11 +3,11 @@ # config # make sure the GITHUB_API_KEY is encrypted and inside the travis file # travis encrypt GITHUB_API_KEY=super_secret --add env.global +# Note - gradle 3.0.0 generates outputs in their own folders - ctrl + f > releaseTest RELEASE_REPO=AllanWang/Frost-for-Facebook-APK-Builder USER_AUTH=AllanWang EMAIL=me@allanwang.ca -APK_NAME=Frost-releaseTest MODULE_NAME=app VERSION_KEY=Frost # Make version key different from module name @@ -15,7 +15,9 @@ VERSION_KEY=Frost # create a new directory that will contain our generated apk mkdir $HOME/$VERSION_KEY/ # copy generated apk from build folder to the folder just created -cp -R $MODULE_NAME/build/outputs/apk/$APK_NAME.apk $HOME/$VERSION_KEY/ +cp -a $MODULE_NAME/build/outputs/apk/releaseTest/. $HOME/$VERSION_KEY/ +printf "Moved apks\n" +ls -a $HOME/${VERSION_KEY} # go to home and setup git echo "Clone Git" @@ -41,9 +43,12 @@ API_JSON="$(printf '{"tag_name": "v%s","target_commitish": "master","name": "v%s newRelease="$(curl --data "$API_JSON" https://api.github.com/repos/$RELEASE_REPO/releases?access_token=$GITHUB_API_KEY)" rID="$(echo "$newRelease" | jq ".id")" -cd $HOME +cd $HOME/${VERSION_KEY} echo "Push apk to $rID" -curl "https://uploads.github.com/repos/${RELEASE_REPO}/releases/${rID}/assets?access_token=${GITHUB_API_KEY}&name=${APK_NAME}-v${TRAVIS_BUILD_NUMBER}.apk" --header 'Content-Type: application/zip' --upload-file $VERSION_KEY/$APK_NAME.apk -X POST - +for apk in $(find *.apk -type f); do + apkName="${apk::-4}" + printf "Apk $apkName\n" + curl "https://uploads.github.com/repos/${RELEASE_REPO}/releases/${rID}/assets?access_token=${GITHUB_API_KEY}&name=${apkName}-v${TRAVIS_BUILD_NUMBER}.apk" --header 'Content-Type: application/zip' --upload-file $apkName.apk -X POST +done echo -e "Done\n"
\ No newline at end of file |