Merge branch 'automate-some-tasks'

This commit is contained in:
Davide De Rosa 2019-04-07 19:25:52 +02:00
commit 78521e5273
4 changed files with 32 additions and 0 deletions

13
ci/commit-changelog.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
VERSION=`ci/version-number.sh`
BUILD=$((`ci/build-number.sh` + 1))
DATE=`date "+%Y-%m-%d"`
CHANGELOG="CHANGELOG.md"
RELEASE_NOTES="fastlane/metadata/en-US/release_notes.txt"
sed "s/Unreleased/$VERSION Beta $BUILD ($DATE)/" $CHANGELOG >$CHANGELOG.tmp
mv $CHANGELOG.tmp $CHANGELOG
ci/latest-changelog.sh | sed -E "s/^(.*) \[#.*$/\1/" >ci/$CHANGELOG
cp ci/$CHANGELOG $RELEASE_NOTES
git add $CHANGELOG $RELEASE_NOTES
git commit -m "Set beta release"

6
ci/latest-changelog.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
TARGET="CHANGELOG.md"
RELEASES=(`grep -n "^## " $TARGET | sed -E "s/^([0-9]+).*$/\1/g"`)
UNRELEASED=${RELEASES[0]}
LATEST=${RELEASES[1]}
cat $TARGET | head -n $((LATEST - 1)) | tail -n $((LATEST - UNRELEASED - 2))

11
ci/list-untranslated.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
DIR="Passepartout/Resources"
FILENAME="Localizable.strings"
STRINGS_EN="$DIR/en.lproj/$FILENAME"
STRINGS_IT="$DIR/it.lproj/$FILENAME"
IDS="string-ids.tmp"
sed -E "s/^(.+) = .*$/\1/" $STRINGS_EN | grep '^"' >$IDS.en
sed -E "s/^(.+) = .*$/\1/" $STRINGS_IT | grep '^"' >$IDS.it
diff $IDS.en $IDS.it | grep "^<" | sed -E 's/^< "(.*)"$/\1/g'
rm -f $IDS.*

2
ci/version-number.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
agvtool what-marketing-version -terse1