system-config/modules/jenkins/files/slave_scripts/propose_translations.sh
Monty Taylor e35a6e7c73 Aggregate jenkins modules into one module.
Put jenkins_master into jenkins::master and jenkins_job_builder into
jenkins::job_builder and jenkins_slave into jenkins::slave.

Change-Id: Icb0e3071894730c17d8f36f49e9d34979d9c568e
Reviewed-on: https://review.openstack.org/11249
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-08-12 18:22:26 +00:00

33 lines
1.0 KiB
Bash
Executable File

#!/bin/bash -xe
git config user.name "OpenStack Jenkins"
git config user.email "jenkins@openstack.org"
# See if there is an open change in the launchpad/translations topic
# If so, amend the commit with new changes since then
previous=`ssh -p 29418 review.openstack.org gerrit query --current-patch-set status:open project:openstack/PROJECT topic:launchpad/translations | grep "^ number:" | awk '{print $2}'`
if [ "x${previous}" != "x" ] ; then
git review -d ${previous}
amend="--amend"
fi
tar xvfz po.tgz
rm po.tgz
for f in po/*po ; do
lang=`echo $f | cut -f2 -d/ | cut -f1 -d.`
if [ -d $PROJECT/locale/$lang ] ; then
cp $f $PROJECT/locale/$lang/LC_MESSAGES/$PROJECT.po
fi
done
python setup.py extract_messages
git add $PROJECT/locale/$PROJECT.pot
python setup.py update_catalog
for f in po/*po ; do
lang=`echo $f | cut -f2 -d/ | cut -f1 -d.`
if [ -d $PROJECT/locale/$lang ] ; then
git add $PROJECT/locale/$lang/LC_MESSAGES/$PROJECT.po
fi
done
git commit ${amend} -m "Imported Translations from Launchpad"
git review -t launchpad/translations