Fix publishing location for translations

We want to publish to
tarballs.openstack.org/translation-source/PROJECT/VERSION . Correctly
construct path for it.

Change-Id: I9802f50cae5dd461f76d8ba016a5f404fe74f4f3
This commit is contained in:
Andreas Jaeger 2016-05-05 22:46:29 +02:00
parent 548d32bf98
commit 5988eab4ac
2 changed files with 9 additions and 7 deletions

View File

@ -15,9 +15,9 @@
- scp:
site: 'tarballs.openstack.org'
files:
- source: 'pot-files/*.pot'
target: 'tarballs/translation-source/{name}/'
keep-hierarchy: false
- source: 'translation-source/**/*.pot'
target: 'tarballs/'
keep-hierarchy: true
- proposal-slave-cleanup
node: 'proposal'

View File

@ -95,9 +95,11 @@ if [ $(git diff --cached | egrep -v "(POT-Creation-Date|^[\+\-]#|^\+{3}|^\-{3})"
# The Zanata client works out what to send based on the zanata.xml file.
# Do not copy translations from other files for this change.
zanata-cli -B -e push --copy-trans False
# Copy all *.pot files to pot-files directory
mkdir -p .pot-files/$ZANATA_VERSION/
# Copy all *.pot files to translation-source directory
TARGET_PATH=.translation-source/$PROJECT/$ZANATA_VERSION/
mkdir -p $TARGET_PATH
# Exclude . directories
find . -path "./.*" -prune -o -name "*.pot" -exec cp -v {} .pot-files \;
mv .pot-files pot-files
find . -path "./.*" -prune -o -name "*.pot" \
-exec cp -v {} $TARGET_PATH \;
mv .translation-source translation-source
fi