1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 22:31:16 +00:00
syncthing-android/publish-release.sh

49 lines
967 B
Bash
Raw Normal View History

2017-09-30 14:52:00 +00:00
#!/usr/bin/env bash
set -e
2017-10-11 03:55:12 +00:00
version=$(git describe --tags)
2017-09-30 14:52:00 +00:00
regex='^[0-9]+\.[0-9]+\.[0-9]+$'
if [[ ! ${version} =~ $regex ]]
then
echo "Current commit is not a release"
exit;
fi
echo "
Pushing to Github
-----------------------------
"
git push
git push --tags
version=`git describe --tags --abbrev=0`
echo "
Push to Google Play
-----------------------------
"
2017-10-08 06:27:09 +00:00
read -s -p "Enter signing password: " password
2017-09-30 14:52:00 +00:00
2017-10-11 03:55:12 +00:00
SIGNING_PASSWORD=${password} ./gradlew assembleRelease
2017-09-30 14:52:00 +00:00
# Upload apk and listing to Google Play
2017-10-11 03:55:12 +00:00
SIGNING_PASSWORD=${password} ./gradlew publishRelease
2017-09-30 14:52:00 +00:00
echo "
Release published!
"
#echo "
#
#Create Github Release
#-----------------------------
#"
#ACCESS_TOKEN=""
#api_json=$(printf '{"tag_name": "v%s","target_commitish": "master","name": "v%s","body": "%s","draft": false,"prerelease": false}' $version $version $changelog)
#curl --data "$api_json" https://api.github.com/repos/syncthing/syncthing-android/releases?access_token=$ACCESS_TOKEN