Fix scripts with platform argument

This commit is contained in:
Davide De Rosa 2021-01-02 23:23:18 +01:00
parent 4136aad268
commit 6c55564dee
8 changed files with 29 additions and 27 deletions

View File

@ -1,5 +1,5 @@
PLATFORM="ios" PLATFORM="ios"
GYM_SCHEME="Passepartout-iOS" GYM_SCHEME="Passepartout-iOS"
BUNDLE_CONTEXT="ios" BUNDLE_CONTEXT="ios"
DELIVER_SCREENSHOTS_PATH="Passepartout/App/iOS/fastlane/screenshots" APP_CONTEXT="iOS"
DELIVER_METADATA_PATH="Passepartout/App/iOS/fastlane/metadata" APP_ROOT="Passepartout/App/$APP_CONTEXT"

View File

@ -1,5 +1,5 @@
PLATFORM="mac" PLATFORM="mac"
GYM_SCHEME="Passepartout-macOS" GYM_SCHEME="Passepartout-macOS"
BUNDLE_CONTEXT="macos" BUNDLE_CONTEXT="macos"
DELIVER_SCREENSHOTS_PATH="Passepartout/App/macOS/fastlane/screenshots" APP_CONTEXT="macOS"
DELIVER_METADATA_PATH="Passepartout/App/macOS/fastlane/metadata" APP_ROOT="Passepartout/App/$APP_CONTEXT"

View File

@ -2,6 +2,9 @@
# For more information, check out the docs # For more information, check out the docs
# https://docs.fastlane.tools/actions/deliver/ # https://docs.fastlane.tools/actions/deliver/
screenshots_path "#{ENV['APP_ROOT']}/fastlane/screenshots"
metadata_path "#{ENV['APP_ROOT']}/fastlane/metadata"
skip_binary_upload true skip_binary_upload true
skip_metadata false skip_metadata false
skip_screenshots false skip_screenshots false

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
PATTERN="fastlane/metadata/*/description.txt" PATTERN="Passepartout/App/*/fastlane/metadata/*/description.txt"
AFTER=$1 AFTER=$1
NAME=$2 NAME=$2
DELIMITER="†" DELIMITER="†"

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
SIZES="120 152 167 180 76" SIZES="120 152 167 180 76"
cd Passepartout-iOS/Assets.xcassets/AppIcon.appiconset cd Passepartout/App/iOS/Assets.xcassets/AppIcon.appiconset
for S in $SIZES; do for S in $SIZES; do
convert -geometry "${S}x${S}" AppIcon-1024.png AppIcon-$S.png convert -geometry "${S}x${S}" AppIcon-1024.png AppIcon-$S.png
done done

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
. .env . .env.$1
DIST="l10n" DIST="l10n"
DIST_APP="$DIST/App" DIST_APP="$DIST/App"
@ -10,20 +10,20 @@ rm -rf $OUTPUT $DIST
mkdir -p $DIST_APP mkdir -p $DIST_APP
mkdir -p $DIST_META mkdir -p $DIST_META
if [[ $1 == "all" ]]; then if [[ $2 == "all" ]]; then
cp Submodules/Core/Passepartout/Resources/en.lproj/Core.strings $DIST_APP/Core.txt cp Passepartout/Core/Resources/en.lproj/Core.strings $DIST_APP/Core.txt
cp Submodules/Core/Passepartout/Resources/en.lproj/Intents.strings $DIST_APP/Intents.txt cp Passepartout/Core/Resources/en.lproj/Intents.strings $DIST_APP/Intents.txt
cp $PROJECT/Global/en.lproj/App.strings $DIST_APP/App.txt cp $APP_ROOT/en.lproj/App.strings $DIST_APP/App.txt
cp $PROJECT/en.lproj/InfoPlist.strings $DIST_APP/InfoPlist.txt cp $APP_ROOT/en.lproj/InfoPlist.strings $DIST_APP/InfoPlist.txt
cp fastlane/metadata/en-US/name.txt $DIST_META cp $APP_ROOT/fastlane/metadata/en-US/name.txt $DIST_META
cp fastlane/metadata/en-US/subtitle.txt $DIST_META cp $APP_ROOT/fastlane/metadata/en-US/subtitle.txt $DIST_META
cp fastlane/metadata/en-US/description.txt $DIST_META cp $APP_ROOT/fastlane/metadata/en-US/description.txt $DIST_META
elif [[ $1 == "new" ]]; then elif [[ $2 == "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 Passepartout/Core/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/Core/Resources/en.lproj/Intents.strings >$DIST_APP/Intents.txt
grep -f templates/new-strings.txt $PROJECT/Global/en.lproj/App.strings >$DIST_APP/App.txt grep -f templates/new-strings.txt $APP_ROOT/en.lproj/App.strings >$DIST_APP/App.txt
grep -f templates/new-strings.txt $PROJECT/en.lproj/InfoPlist.strings >$DIST_APP/InfoPlist.txt grep -f templates/new-strings.txt $APP_ROOT/en.lproj/InfoPlist.strings >$DIST_APP/InfoPlist.txt
else else
echo "No argument given (all|new)" echo "No argument given (all|new)"
exit exit

View File

@ -1,12 +1,12 @@
#!/bin/sh #!/bin/sh
. .env . .env.$1
DIR_APP="$PROJECT/Global" DIR_APP="$APP_ROOT"
FILENAME_APP="App.strings" FILENAME_APP="App.strings"
DIR_CORE="Submodules/Core/Passepartout/Resources" DIR_CORE="Passepartout/Core/Resources"
FILENAME_CORE="Core.strings" FILENAME_CORE="Core.strings"
if [[ $2 = "core" ]]; then if [[ $3 = "core" ]]; then
DIR=$DIR_CORE DIR=$DIR_CORE
FILENAME=$FILENAME_CORE FILENAME=$FILENAME_CORE
else else
@ -15,7 +15,7 @@ else
fi fi
LANG_BASE="en" LANG_BASE="en"
LANG_TARGET="$1" LANG_TARGET="$2"
STRINGS_BASE="$DIR/$LANG_BASE.lproj/$FILENAME" STRINGS_BASE="$DIR/$LANG_BASE.lproj/$FILENAME"
STRINGS_TARGET="$DIR/$LANG_TARGET.lproj/$FILENAME" STRINGS_TARGET="$DIR/$LANG_TARGET.lproj/$FILENAME"
IDS="string-ids.tmp" IDS="string-ids.tmp"

View File

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