Move scripts to Core

This commit is contained in:
Davide De Rosa 2019-12-12 20:50:57 +01:00
parent b60d697fb0
commit ec9ba7024f
7 changed files with 8 additions and 69 deletions

2
.env
View File

@ -1,5 +1,7 @@
PLATFORM="ios"
APP_NAME="Passepartout"
PROJECT="Passepartout-iOS"
GYM_SCHEME="Passepartout-iOS"
MATCH_READONLY="true"
BUILD_PATH="build"

1
.gitignore vendored
View File

@ -17,3 +17,4 @@ templates/
.env.secret*
Preview.html
l10n
passepartout-translations.zip

@ -1 +1 @@
Subproject commit a25761342a62c75723d523a5c4a0440ad342191c
Subproject commit 65e00bc19c74dd8a9f61285d3c442cf97781e88d

View File

@ -1,31 +0,0 @@
#!/bin/sh
DIST="l10n"
DIST_APP="$DIST/App"
DIST_META="$DIST/Meta"
OUTPUT="passepartout-translations.zip"
rm -rf $OUTPUT $DIST
mkdir -p $DIST_APP
mkdir -p $DIST_META
if [[ $1 == "all" ]]; then
cp Submodules/Core/Passepartout/Resources/en.lproj/Core.strings $DIST_APP/Core.txt
cp Submodules/Core/Passepartout/Resources/en.lproj/Intents.strings $DIST_APP/Intents.txt
cp Passepartout-iOS/Global/en.lproj/App.strings $DIST_APP/App.txt
cp Passepartout-iOS/en.lproj/InfoPlist.strings $DIST_APP/InfoPlist.txt
cp fastlane/metadata/en-US/name.txt $DIST_META
cp fastlane/metadata/en-US/subtitle.txt $DIST_META
cp fastlane/metadata/en-US/description.txt $DIST_META
elif [[ $1 == "new" ]]; then
grep -f templates/new-strings.txt Submodules/Core/Passepartout/Resources/en.lproj/Core.strings >$DIST_APP/Core.txt
grep -f templates/new-strings.txt Submodules/Core/Passepartout/Resources/en.lproj/Intents.strings >$DIST_APP/Intents.txt
grep -f templates/new-strings.txt Passepartout-iOS/Global/en.lproj/App.strings >$DIST_APP/App.txt
grep -f templates/new-strings.txt Passepartout-iOS/en.lproj/InfoPlist.strings >$DIST_APP/InfoPlist.txt
else
echo "No argument given (all|new)"
exit
fi
cp templates/iaps.txt $DIST/Products.txt
zip -r $OUTPUT $DIST

View File

@ -0,0 +1 @@
../Submodules/Core/scripts/export-for-translations.sh

View File

@ -1,28 +0,0 @@
#!/bin/sh
DIR_APP="Passepartout-iOS/Global"
FILENAME_APP="App.strings"
DIR_CORE="Submodules/Core/Passepartout/Resources"
FILENAME_CORE="Core.strings"
if [[ $2 = "core" ]]; then
DIR=$DIR_CORE
FILENAME=$FILENAME_CORE
else
DIR=$DIR_APP
FILENAME=$FILENAME_APP
fi
LANG_BASE="en"
LANG_TARGET="$1"
STRINGS_BASE="$DIR/$LANG_BASE.lproj/$FILENAME"
STRINGS_TARGET="$DIR/$LANG_TARGET.lproj/$FILENAME"
IDS="string-ids.tmp"
TMPOUT="untranslated.tmp"
sed -E "s/^(.+) = .*$/\1/" $STRINGS_BASE | sort | grep '^"' >$IDS.$LANG_BASE
sed -E "s/^(.+) = .*$/\1/" $STRINGS_TARGET | sort | grep '^"' >$IDS.$LANG_TARGET
diff $IDS.$LANG_BASE $IDS.$LANG_TARGET | grep "^<" | sed -E 's/^< "(.*)"$/\1/g' >$TMPOUT
rm -f $IDS.*
grep -f $TMPOUT $STRINGS_BASE
rm $TMPOUT

View File

@ -0,0 +1 @@
../Submodules/Core/scripts/list-untranslated.sh

View File

@ -1,6 +0,0 @@
#!/bin/sh
git push && git push github
git push --tags && git push --tags github
git checkout stable && git merge master
git push github
git checkout master

1
scripts/push-release.sh Symbolic link
View File

@ -0,0 +1 @@
../Submodules/Core/scripts/push-release.sh

View File

@ -1,3 +0,0 @@
#!/bin/sh
git checkout Passepartout*/Info.plist
git checkout Passepartout*.pbxproj

1
scripts/reset-archive.sh Symbolic link
View File

@ -0,0 +1 @@
../Submodules/Core/scripts/reset-archive.sh