1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 03:11:30 +00:00

Update release scripts

This commit is contained in:
Felix Ableitner 2017-10-11 12:55:12 +09:00
parent 432c666c0d
commit 9840076f31
3 changed files with 25 additions and 25 deletions

View file

@ -95,7 +95,7 @@ task cleanNative(type: Delete) {
play {
jsonFile = file('keys.json')
uploadImages = false
track = 'beta'
track = 'production'
}
/**

View file

@ -4,7 +4,7 @@ set -e
NEW_VERSION_NAME=$1
OLD_VERSION_NAME=$(grep "versionName" "build.gradle" | awk '{print $2}')
if [[ -z $NEW_VERSION_NAME ]]
if [[ -z ${NEW_VERSION_NAME} ]]
then
echo "New version name is empty. Please set a new version. Current version: $OLD_VERSION_NAME"
exit
@ -20,15 +20,15 @@ cd "ext/syncthing/src/github.com/syncthing/syncthing/"
git fetch
CURRENT_TAG=$(git describe)
LATEST_TAG=$(git tag --sort=taggerdate | awk '!/rc/' | tail -1)
if [ $CURRENT_TAG != $LATEST_TAG ]
if [ ${CURRENT_TAG} != ${LATEST_TAG} ]
then
git checkout -f $LATEST_TAG
cd $PROJECT_DIR
git checkout -f ${LATEST_TAG}
cd ${PROJECT_DIR}
git add "ext/syncthing/src/github.com/syncthing/syncthing"
git commit -m "Updated Syncthing to $LATEST_TAG"
./gradlew cleanNative buildNative
fi
cd $PROJECT_DIR
cd ${PROJECT_DIR}
echo "
@ -51,10 +51,22 @@ fi
echo "
Running Tests
Running Lint
-----------------------------
"
./gradlew clean lint
./gradlew clean lintVitalRelease
echo "
Enter Changelog for $NEW_VERSION_NAME
-----------------------------
"
changelog_file="build/changelog.tmp"
touch ${changelog_file}
nano ${changelog_file}
cat ${changelog_file}
mv ${changelog_file} "src/main/play/en-GB/whatsnew"
echo "
@ -67,9 +79,9 @@ sed -i "s/versionCode $OLD_VERSION_CODE/versionCode $NEW_VERSION_CODE/" build.gr
OLD_VERSION_NAME=$(grep "versionName" "build.gradle" | awk '{print $2}')
sed -i "s/$OLD_VERSION_NAME/\"$1\"/" build.gradle
git add "build.gradle"
git add "build.gradle" "src/main/play/en-GB/whatsnew"
git commit -m "Bumped version to $NEW_VERSION_NAME"
git tag $NEW_VERSION_NAME
git tag ${NEW_VERSION_NAME}
echo "
Update ready.

View file

@ -2,7 +2,7 @@
set -e
version=$(git describe --always)
version=$(git describe --tags)
regex='^[0-9]+\.[0-9]+\.[0-9]+$'
if [[ ! ${version} =~ $regex ]]
then
@ -22,28 +22,16 @@ version=`git describe --tags --abbrev=0`
echo "
Enter Changelog for $version
-----------------------------
"
changelog_file="build/changelog.tmp"
touch ${changelog_file}
nano ${changelog_file}
changelog=`cat ${changelog_file}`
mv ${changelog_file} "src/main/play/en-GB/whatsnew"
echo "
Push to Google Play
-----------------------------
"
read -s -p "Enter signing password: " password
SIGNING_PASSWORD=$password ./gradlew assembleRelease
SIGNING_PASSWORD=${password} ./gradlew assembleRelease
# Upload apk and listing to Google Play
SIGNING_PASSWORD=$password ./gradlew publishRelease
SIGNING_PASSWORD=${password} ./gradlew publishRelease
echo "