From 862c83f4b6ca472c17e2733bbacbfe4e79f4ef3f Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Fri, 4 Aug 2023 00:56:31 +0200 Subject: [PATCH] Add transifex task to CI/CD (build) config --- .build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.build.yml b/.build.yml index 86a5da1..8d4a241 100644 --- a/.build.yml +++ b/.build.yml @@ -1,12 +1,15 @@ image: debian/unstable packages: - openjdk-8-jdk + - gettext oauth: pages.sr.ht/PAGES:RW environment: site: damn-plugin.tojemoje.site wd: damn-plugin sources: - https://git.sr.ht/~qeef/damn-plugin +secrets: + - bcc453bf-42e6-460f-afe1-79eeed339db7 tasks: - test-build: | cd $wd @@ -15,6 +18,24 @@ tasks: ./gradlew compileJava_minJosm ./gradlew compileJava_latestJosm ./gradlew compileJava_testedJosm + - transifex: | + cd $wd + if [ $(git log --decorate | head -1 | grep -c 'master') -eq 0 ] + then + complete-build + fi + ./gradlew generatePot + curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash + set +x + TX_TOKEN="$(cat ~/.transifex-token)" ./tx push -s + set -x + if [ $(git log --decorate | head -1 | grep -c 'v[0-9]\+\.[0-9]\+\.[0-9]\+') -eq 0 ] + then + complete-build + fi + set +x + TX_TOKEN="$(cat ~/.transifex-token)" ./tx pull -a -f + set -x - make-pages: | mkdir public cd $wd -- 2.45.2