mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-21 20:01:15 +00:00
Updated Syncthing to v1.2.0-rc.2
This commit is contained in:
parent
5305e5c7e2
commit
99be44ca25
6 changed files with 126 additions and 1 deletions
43
scripts/bump-version.bash
Executable file
43
scripts/bump-version.bash
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
NEW_VERSION_NAME=$1
|
||||
OLD_VERSION_NAME=$(grep "versionName" "app/build.gradle" | awk '{print $2}')
|
||||
if [[ -z ${NEW_VERSION_NAME} ]]
|
||||
then
|
||||
echo "New version name is empty. Please set a new version. Current version: $OLD_VERSION_NAME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./scripts/check-version.bash "$NEW_VERSION_NAME"
|
||||
|
||||
echo "
|
||||
|
||||
Running Lint
|
||||
-----------------------------
|
||||
"
|
||||
./gradlew clean lintVitalRelease
|
||||
|
||||
echo "
|
||||
|
||||
Enter Changelog for $NEW_VERSION_NAME
|
||||
-----------------------------
|
||||
"
|
||||
CHANGELOG=app/src/main/play/release-notes/en-GB/default.txt
|
||||
edit $CHANGELOG
|
||||
|
||||
echo "
|
||||
|
||||
Updating Version
|
||||
-----------------------------
|
||||
"
|
||||
OLD_VERSION_CODE=$(grep "versionCode" "app/build.gradle" -m 1 | awk '{print $2}')
|
||||
NEW_VERSION_CODE=$(($OLD_VERSION_CODE + 1))
|
||||
sed -i "s/versionCode $OLD_VERSION_CODE/versionCode $NEW_VERSION_CODE/" "app/build.gradle"
|
||||
|
||||
OLD_VERSION_NAME=$(grep "versionName" "app/build.gradle" | awk '{print $2}')
|
||||
sed -i "s/$OLD_VERSION_NAME/\"$1\"/" "app/build.gradle"
|
||||
git add "app/build.gradle" $CHANGELOG
|
||||
git commit -m "Bumped version to $NEW_VERSION_NAME"
|
||||
git tag ${NEW_VERSION_NAME}
|
24
scripts/check-version.bash
Executable file
24
scripts/check-version.bash
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "
|
||||
|
||||
Checking Syncthing Version is compatible
|
||||
-----------------------------
|
||||
"
|
||||
|
||||
NEW_VERSION_NAME=$1
|
||||
if [[ -z ${NEW_VERSION_NAME} ]]
|
||||
then
|
||||
echo "New version name is empty. Please set a new version. Current version: $OLD_VERSION_NAME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "syncthing/src/github.com/syncthing/syncthing/"
|
||||
CURRENT_TAG=$(git describe)
|
||||
if [ "v${NEW_VERSION_NAME#$CURRENT_TAG}" = "v${NEW_VERSION_NAME}" ]; then
|
||||
printf "New version name %s is not compatible with Syncthing version %s\n" \
|
||||
"$NEW_VERSION_NAME" "$CURRENT_TAG"
|
||||
exit 1
|
||||
fi
|
22
scripts/pull-translations.bash
Executable file
22
scripts/pull-translations.bash
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
printf "Pulling Translations
|
||||
-----------------------------
|
||||
"
|
||||
# Force pull to make sure this is executed. Apparently tx only compares timestamps, not file
|
||||
# contents. So if a file was `touch`ed, it won't be updated by default.
|
||||
# Use multiple transifex instances for pulling to speed things up.
|
||||
tx pull -a -f -r "syncthing-android.stringsxml" &
|
||||
tx pull -a -f -r "syncthing-android.description_fulltxt" &
|
||||
tx pull -a -f -r "syncthing-android.description_shorttxt" &
|
||||
tx pull -a -f -r "syncthing-android.titletxt" &
|
||||
wait
|
||||
./gradlew deleteUnsupportedPlayTranslations
|
||||
git add -A "app/src/main/play/"
|
||||
git add -A "app/src/main/res/values-*/strings.xml"
|
||||
if ! git diff --cached --exit-code >/dev/null;
|
||||
then
|
||||
git commit -m "Imported translations"
|
||||
fi
|
8
scripts/push-translations.bash
Executable file
8
scripts/push-translations.bash
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
printf "Pushing Translations
|
||||
-----------------------------
|
||||
"
|
||||
tx push -s
|
28
scripts/update-syncthing.bash
Executable file
28
scripts/update-syncthing.bash
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
LATEST_TAG=$1
|
||||
|
||||
echo "
|
||||
|
||||
Checking for Syncthing Update
|
||||
-----------------------------
|
||||
"
|
||||
PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
||||
cd "syncthing/src/github.com/syncthing/syncthing/"
|
||||
git fetch
|
||||
CURRENT_TAG=$(git describe)
|
||||
if [ -z "$LATEST_TAG" ]; then
|
||||
LATEST_TAG=$(git tag --sort=taggerdate | tail -1)
|
||||
fi
|
||||
|
||||
if [ ${CURRENT_TAG} != ${LATEST_TAG} ]; then
|
||||
git checkout -f ${LATEST_TAG}
|
||||
cd ${PROJECT_DIR}
|
||||
git add "syncthing/src/github.com/syncthing/syncthing/"
|
||||
git commit -m "Updated Syncthing to $LATEST_TAG"
|
||||
else
|
||||
echo "Syncthing up-to-date at $CURRENT_TAG"
|
||||
fi
|
||||
cd ${PROJECT_DIR}
|
|
@ -1 +1 @@
|
|||
Subproject commit 21f50e2f8fb57f30ffc313a115350f0ef9abdd06
|
||||
Subproject commit bf744ded311cdeac6234bce95a8a4871baaefcc0
|
Loading…
Reference in a new issue