mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 09:49:21 +02:00
move scripts to new scripts
folder
This commit is contained in:
parent
3b4ed28269
commit
678385a887
11 changed files with 9 additions and 9 deletions
24
scripts/add-language.sh
Executable file
24
scripts/add-language.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
# add a language, must be executed from the repo root
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "Please specify the language to add as the first argument (dk, ru etc.)"
|
||||
exit
|
||||
fi
|
||||
|
||||
LANG=$1
|
||||
|
||||
mkdir res/values-$LANG/
|
||||
|
||||
cp res/values/strings.xml res/values-$LANG/strings.xml
|
||||
|
||||
# set time to old date because transifex may have different file times
|
||||
# and does not overwrite old file
|
||||
# (using -t as sth. as -d "100 days ago" does not work on mac)
|
||||
touch -t 201901010000 res/values-$LANG/strings.xml
|
||||
|
||||
echo "res/values-$LANG/strings.xml added:"
|
||||
echo "- add the name to res/values/arrays.xml"
|
||||
echo "- if needed, language mappings can be added to .tx/config"
|
||||
echo "- pull translations using ./scripts/tx-pull-translations.sh"
|
||||
echo " (on problems, 'tx -d pull' gives verbose output)"
|
7
scripts/check-translations.sh
Executable file
7
scripts/check-translations.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
echo potential errors, if any:
|
||||
|
||||
# a space after the percent sign
|
||||
# results in an IllegalFormatException in getString()
|
||||
grep --include='strings.xml' -r '\% ' .
|
||||
grep --include='strings.xml' -r '\$ ' .
|
||||
grep --include='strings.xml' -r ' \$' .
|
1
scripts/clean-core.sh
Executable file
1
scripts/clean-core.sh
Executable file
|
@ -0,0 +1 @@
|
|||
rm -rf jni/deltachat-core-rust/target
|
20
scripts/grep-string.sh
Executable file
20
scripts/grep-string.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
TEXT=$1
|
||||
|
||||
if [ -z "$TEXT" ]; then
|
||||
echo "this script searches for the string key given as the first parameter."
|
||||
echo "search is done in this repo and in ../deltachat-ios and in ../deltachat-desktop."
|
||||
echo "usage: ./scripts/grep-string.sh <STRING-KEY>"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "==================== ANDROID USAGE ===================="
|
||||
grep --exclude={*.apk,*.a,*.o,*.so,strings.xml} --exclude-dir={.git,.gradle,obj,release,.idea,build,deltachat-core-rust} -ri $TEXT .
|
||||
|
||||
echo "==================== IOS USAGE ===================="
|
||||
grep --exclude=*.strings --exclude-dir={.git,libraries,Pods,deltachat-ios.xcodeproj,deltachat-ios.xcworkspace} -ri $TEXT ../deltachat-ios/
|
||||
|
||||
echo "==================== DESKTOP USAGE ===================="
|
||||
grep --exclude-dir={.git,_locales} -ri $TEXT ../deltachat-desktop/
|
||||
|
||||
echo "==================== NODE USAGE ===================="
|
||||
grep --exclude-dir={.git} -ri $TEXT ../deltachat-node/
|
4
scripts/tx-pull-source.sh
Executable file
4
scripts/tx-pull-source.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
tx pull -l en
|
||||
mv res/values-en/strings.xml res/values/strings.xml
|
||||
rmdir res/values-en
|
||||
./scrips/check-translations.sh
|
2
scripts/tx-pull-translations.sh
Executable file
2
scripts/tx-pull-translations.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
tx pull -f
|
||||
./scripts/check-translations.sh
|
3
scripts/tx-push-source.sh
Executable file
3
scripts/tx-push-source.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
read -p "Push res/values/strings.xml to transifex? Press ENTER to continue, CTRL-C to abort."
|
||||
tx push -s
|
||||
./scripts/check-translations.sh
|
13
scripts/tx-update-changed-sources.sh
Executable file
13
scripts/tx-update-changed-sources.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
echo "This script allows to make changes to the english source"
|
||||
echo "without forcing all translations to be redone."
|
||||
echo "(on transifex the english source is the key)"
|
||||
echo "This is done by pulling the translations"
|
||||
echo "and immediately pushing them again together with the source."
|
||||
echo "************************************************************************************"
|
||||
echo "Pushing translations is POTENTIALLY HARMFUL so this script should be used with care."
|
||||
echo "In most cases, just use ./scrips/tx-push-translations.sh which is safer."
|
||||
echo "************************************************************************************"
|
||||
read -p "Press ENTER to continue, CTRL-C to abort."
|
||||
tx pull -f
|
||||
tx push -s -t
|
||||
./scrips/check-translations.sh
|
22
scripts/update-core.sh
Executable file
22
scripts/update-core.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
|
||||
# this script updates the deltachat-core-rust sub-repository from github.
|
||||
# must be executed from the repo root.
|
||||
#
|
||||
# - make sure, the deltachat-android directory is clean
|
||||
# - make sure, deltachat-core-rust is committed successfully before calling this script
|
||||
|
||||
# check out submodules as present in the repository
|
||||
git submodule update --init --recursive
|
||||
|
||||
# update submodule
|
||||
cd jni/deltachat-core-rust
|
||||
git checkout master
|
||||
git pull
|
||||
cd ../..
|
||||
|
||||
# commit changes
|
||||
git add jni/deltachat-core-rust
|
||||
git commit -m "update deltachat-core-rust submodule"
|
||||
|
||||
echo "changes are commited to local repo."
|
||||
echo "use 'git push' to use them or 'git reset HEAD~1; git submodule update --recursive' to abort on your own risk :)"
|
35
scripts/upload-release.sh
Executable file
35
scripts/upload-release.sh
Executable file
|
@ -0,0 +1,35 @@
|
|||
|
||||
VERSION=$1
|
||||
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "this script uploads apk and symbols to get.delta.chat"
|
||||
echo "the script does not upload things to gplay or other stores."
|
||||
echo ""
|
||||
echo "usage: ./scrips/upload-release.sh <VERSION>"
|
||||
exit
|
||||
fi
|
||||
if [[ ${VERSION:0:1} == "v" ]]; then
|
||||
echo "VERSION must not begin with 'v' here."
|
||||
exit
|
||||
fi
|
||||
|
||||
cd gplay/release
|
||||
APK="deltachat-gplay-release-$VERSION.apk"
|
||||
ls -l $APK
|
||||
read -p "upload this apk and belonging symbols to get.delta.chat? ENTER to continue, CTRL-C to abort."
|
||||
|
||||
# you need the private SSH key of the jekyll user; you can find it in this file:
|
||||
# https://github.com/hpk42/otf-deltachat/blob/master/secrets/delta.chat
|
||||
# It is protected with [git-crypt](https://www.agwa.name/projects/git-crypt/) -
|
||||
# after installing it, you can decrypt it with `git crypt unlock`.
|
||||
# If your key isn't added to the secrets, and you know some of the team in person,
|
||||
# you can ask on irc #deltachat for access.
|
||||
# Add the key to your `~/.ssh/config` for the host, or to your ssh-agent, so rsync is able to use it)
|
||||
rsync --progress $APK jekyll@download.delta.chat:/var/www/html/download/android/
|
||||
|
||||
cd ../..
|
||||
SYMBOLS_ZIP="$APK-symbols.zip"
|
||||
rm $SYMBOLS_ZIP
|
||||
zip -r $SYMBOLS_ZIP obj
|
||||
ls -l $SYMBOLS_ZIP
|
||||
rsync --progress $SYMBOLS_ZIP jekyll@download.delta.chat:/var/www/html/download/android/symbols/
|
Loading…
Add table
Add a link
Reference in a new issue