Seperate git commits into own perl script

stable^2
Hakan Tandogan 2013-06-20 13:50:34 +02:00
rodzic 3339a9f367
commit 0ff767b2c2
2 zmienionych plików z 9 dodań i 29 usunięć

@ -1 +1 @@
Subproject commit a2bc803e3f3026b5ecf6536628c83cdaa16b9b0e
Subproject commit b6b23f10b638af109c16fec0b98a03064dd0523f

Wyświetl plik

@ -3,7 +3,7 @@
# Pull translations from transifex
# Forcibly pull all translations becase git clone in a fresh repo causes the local files to
# be more recent then translations on transifex, therefore the translastion is skipped
tx pull --force
tx pull --force --all
# Commit any changes
# git diff
@ -11,39 +11,19 @@ tx pull --force
git config user.email "hakan@gurkensalat.com"
git config user.name "Hakan Tandogan"
git add scripts/transifex-fetch-translations.sh
git commit -m "Updated message translation fetching script" scripts/transifex-fetch-translations.sh
# git add scripts/transifex-fetch-translations.sh
# git commit -m "Updated message translation fetching script" scripts/transifex-fetch-translations.sh
# Loop over all translations
for translation in $(find locale -name \*.po)
do
# Set sane defaults for attribution
git config user.email "transifex-daemon@gurkensalat.com"
git config user.name "Transifex Daemon"
# Try hard to attribute git commits to translators
LAST_TRANSLATOR=$(grep Last-Translator: ${translation} | head -n 1)
if [ $? == 0 ]
then
LAST_TRANSLATOR=$(echo ${LAST_TRANSLATOR} | sed -e 's/\"Last-Translator: //')
LAST_TRANSLATOR=$(echo ${LAST_TRANSLATOR} | sed -e 's/\\n\"//')
USER_EMAIL=$(echo ${LAST_TRANSLATOR} | sed -e 's/.*<//' | sed -e 's/>$//')
USER_NAME=$(echo ${LAST_TRANSLATOR} | sed -e 's/ <.*>//')
if [ ! "${USER_NAME}" == "FULL NAME" ]
then
git config user.email "${USER_EMAIL}"
git config user.name "${USER_NAME}"
fi
fi
# git config --list
git add ${translation}
git commit -m "Translated ${translation} on transifex.com" ${translation}
$(dirname $0)/../ci-scripts/transifex-commit-translations.pl ${translation}
done
# Reset my own git config after shell run
git config user.email "hakan@gurkensalat.com"
git config user.name "Hakan Tandogan"
# Keep Jenkins happy so it won't mark the build as failed for no reason :-(
true