From ab4336ffc4e10babe130ea856ca3c48d0bb19824 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 7 Jun 2023 19:25:58 +0200 Subject: [PATCH] gitlab-ci: add job to check for merge conflicts with Weblate --- .gitlab-ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 36b499c20..93b8c3b8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,6 +78,30 @@ tools scripts: - echo "These are unused or blank translations that should be removed:" - git --no-pager diff --ignore-all-space --name-only --exit-code app/src/*/res/values*/strings.xml +weblate merge conflict: + stage: lint + image: debian:bookworm-slim + rules: + - changes: + - .gitlab-ci.yml + - app/src/*/res/values*/strings.xml + script: + - apt-get update + - apt-get -qy install --no-install-recommends ca-certificates git + - git config user.name "$CI_PIPELINE_ID/$CI_JOB_ID" + - git config user.email $CI_PROJECT_PATH@f-droid.org + - git fetch https://hosted.weblate.org/git/f-droid/f-droid + - git checkout -B weblate FETCH_HEAD + - export EXITVALUE=0 + - if ! git rebase $CI_COMMIT_SHA; then + export EXITVALUE=1; + set -x; + while git rebase --skip; do echo; done; + set +x; + fi + - git diff --exit-code + - exit $EXITVALUE + errorprone: extends: .base stage: test