From ff88628acfc50f79c180f1ac1f299a15ceb9cd83 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 17 Aug 2018 13:58:08 +0200 Subject: [PATCH] [zanata] Use git branch to specify the version of zanata's project --- .gitlab-ci.yml | 2 +- Makefile | 6 +++--- scripts/push-trad-to-zanata.sh | 2 +- zanata.xml | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 543f41a..f0f664a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -105,4 +105,4 @@ funky: # - if [ ! -z ${ZANATA_CONFIG_FRAMABOT+x} ]; then make push-locales; fi # only: # - develop -# - work-on-locales +# - master diff --git a/Makefile b/Makefile index 292821c..df98fac 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,14 @@ locales: scripts/locales.sh push-locales: locales - zanata-cli -q -B push --errors + zanata-cli -q -B push --errors --project-version `git branch | grep \* | cut -d ' ' -f2-` pull-locales: - zanata-cli -q -B pull --min-doc-percent 50 + zanata-cli -q -B pull --min-doc-percent 50 --project-version `git branch | grep \* | cut -d ' ' -f2-` scripts/po2json.sh stats-locales: - zanata-cli -q stats + zanata-cli -q stats --project-version `git branch | grep \* | cut -d ' ' -f2-` push-trad-to-zanata: scripts/push-trad-to-zanata.sh $(filter-out $@,$(MAKECMDGOALS)) diff --git a/scripts/push-trad-to-zanata.sh b/scripts/push-trad-to-zanata.sh index b452050..6c14107 100755 --- a/scripts/push-trad-to-zanata.sh +++ b/scripts/push-trad-to-zanata.sh @@ -7,5 +7,5 @@ then else LOCALE=$(echo $FILE | sed -e "s@_@-@g") json2po -i locale/$FILE.json -t locale/en.json -o po/$FILE.po - zanata-cli -q -B push --push-type trans -l $LOCALE + zanata-cli -q -B push --push-type trans -l $LOCALE --project-version $(git branch | grep \* | cut -d ' ' -f2-) fi diff --git a/zanata.xml b/zanata.xml index 13e1bbe..d433947 100644 --- a/zanata.xml +++ b/zanata.xml @@ -2,7 +2,6 @@ https://trad.framasoft.org/ framadate - master gettext po po