From fbe3c3bc130d5f407556ccb917641d80d99c9e8d Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Mon, 21 May 2018 18:08:03 +0200 Subject: [PATCH] [zanata] update Makefile to push or pull only on master and dev branch --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d318026..e94c781 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ XGETTEXT=carton exec local/bin/xgettext.pl -u CARTON=carton exec LUTIM=script/lutim REAL_LUTIM=script/application +HEAD := $(shell git rev-parse --abbrev-ref HEAD) minify: @echo "CSS concatenation" @@ -16,10 +17,16 @@ locales: $(XGETTEXT) $(EXTRACTDIR) -o $(POT) 2>/dev/null push-locales: - zanata-cli -q -B push + ifeq ($(HEAD),$(filter $(HEAD),master development)) + sed -e 's@.*@$(HEAD)@' -i zanata.xml && \ + zanata-cli -q -B push + endif pull-locales: - zanata-cli -q -B pull + ifeq ($(HEAD),$(filter $(HEAD),master development)) + sed -e 's@.*@$(HEAD)@' -i zanata.xml && \ + zanata-cli -q -B pull + endif stats-locales: zanata-cli -q stats