mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-22 20:31:16 +00:00
Merge branch 'publish-script'
This commit is contained in:
commit
7171402cbe
4 changed files with 85 additions and 10 deletions
21
build.gradle
21
build.gradle
|
@ -45,6 +45,11 @@ android {
|
|||
buildTypes.debug.applicationIdSuffix ".debug"
|
||||
dataBinding.enabled = true
|
||||
|
||||
playAccountConfigs {
|
||||
defaultAccountConfig {
|
||||
jsonFile = file('keys.json')
|
||||
}
|
||||
}
|
||||
defaultConfig {
|
||||
applicationId "com.nutomic.syncthingandroid"
|
||||
minSdkVersion 14
|
||||
|
@ -53,6 +58,21 @@ android {
|
|||
versionName "0.9.15"
|
||||
testApplicationId 'com.nutomic.syncthingandroid.test'
|
||||
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
|
||||
playAccountConfig = playAccountConfigs.defaultAccountConfig
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(RELEASE_STORE_FILE)
|
||||
storePassword System.getenv("SIGNING_PASSWORD") ?: ""
|
||||
keyAlias RELEASE_KEY_ALIAS
|
||||
keyPassword System.getenv("SIGNING_PASSWORD") ?: ""
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
|
@ -75,6 +95,7 @@ task cleanNative(type: Delete) {
|
|||
play {
|
||||
jsonFile = file('keys.json')
|
||||
uploadImages = false
|
||||
track = 'beta'
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
android.useDeprecatedNdk=true
|
||||
org.gradle.jvmargs=-Xmx2048M
|
||||
RELEASE_STORE_FILE=/home/felix/workspace/android.keystore
|
||||
RELEASE_KEY_ALIAS=android
|
61
publish-release.sh
Executable file
61
publish-release.sh
Executable file
|
@ -0,0 +1,61 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
version=$(git describe --always)
|
||||
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 "
|
||||
|
||||
Enter Changelog for $version
|
||||
-----------------------------
|
||||
"
|
||||
changelog_file="/tmp/changelog.tmp"
|
||||
touch
|
||||
${DEFAULT_EDITOR} $changelog_file
|
||||
|
||||
changelog=`cat $changelog_file`
|
||||
rm $changelog_file
|
||||
echo $changelog > "src/main/play/en-GB/whatsnew"
|
||||
|
||||
echo "
|
||||
|
||||
Push to Google Play
|
||||
-----------------------------
|
||||
"
|
||||
|
||||
read -p "Enter signing password: " password
|
||||
|
||||
SIGNING_PASSWORD=$password ./gradlew assembleRelease
|
||||
|
||||
# Upload apk and listing to Google Play
|
||||
./gradlew publishRelease
|
||||
|
||||
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
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CHANGELOG_FILE="src/main/play/en-GB/whatsnew"
|
||||
rm $CHANGELOG_FILE
|
||||
nano $CHANGELOG_FILE
|
||||
cat $CHANGELOG_FILE
|
||||
git push
|
||||
git push --tags
|
||||
./gradlew publishRelease
|
Loading…
Reference in a new issue