diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2018-09-10 12:03:08 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2018-09-11 07:18:07 +0000 |
| commit | 9b355ded8fcf0526dd8f48c7127785169cba435d (patch) | |
| tree | bed48959d543adefc045d258240abef91a0806e1 | |
| parent | Remove the custom handling of column editability, that is not how to do it. (diff) | |
| download | inkscape-9b355ded8fcf0526dd8f48c7127785169cba435d.tar.gz inkscape-9b355ded8fcf0526dd8f48c7127785169cba435d.zip | |
CI: Initial automation and checks for translations
| -rw-r--r-- | .gitlab-ci.yml | 52 | ||||
| -rwxr-xr-x | po/update_po_files.sh | 2 |
2 files changed, 44 insertions, 10 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cec9c97c0..a2affd56f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,14 +33,6 @@ inkscape:linux: paths: - build/ -inkscape:codequality: - stage: build - script: - - git fetch https://gitlab.com/inkscape/inkscape.git - - git diff FETCH_HEAD -U0 --no-color | clang-format-diff-6.0 -p1 -style file | tee clang_format_diff - - if [[ -s clang_format_diff ]]; then false; fi - allow_failure: true - inkscape:mac: stage: build tags: @@ -74,7 +66,16 @@ inkscape:mac: - build/ allow_failure: true -inkscape:doc: + +codequality: + stage: build + script: + - git fetch https://gitlab.com/inkscape/inkscape.git + - git diff FETCH_HEAD -U0 --no-color | clang-format-diff-6.0 -p1 -style file | tee clang_format_diff + - if [[ -s clang_format_diff ]]; then false; fi + allow_failure: true + +source-doc: stage: build only: - schedules @@ -114,11 +115,42 @@ test:linux: - make test - ctest -V +translations: + stage: build + #dependencies: + # - inkscape:linux + script: + # make sure dependecies for inkscape.pot are up-to-date + - mkdir build && cd build && cmake .. && make inkscape_pot && cd .. + - cd po/ + + # update POTFILES.in + - grep -v "^#" POTFILES.in > POTFILES.in.1 + - ./generate_POTFILES.sh + - grep -v "^#" POTFILES.in > POTFILES.in.2 + + # update inkscape.pot and sync all .po files + - intltool-update --pot && mv untitled.pot inkscape.pot + - ./update_po_files.sh + + # check if POTFILES.in should be updated in the repo (shall we automate this?) + - 'if [ -n "$(diff POTFILES.in.1 POTFILES.in.2)" ]; then + echo "New translatable source files were added."; + echo "Please update POTFILES.in so they can be translated (or add them to POTFILES.skip)"; + exit 1; + fi' + - rm POTFILES.in.1 POTFILES.in.2 + artifacts: + name: "translations" + paths: + - po/ + when: always + # uploads the clang scan to user.gitlab.io/inkscape/ pages: stage: deploy dependencies: - - inkscape:doc + - source-doc - clang script: - mkdir -p public/ diff --git a/po/update_po_files.sh b/po/update_po_files.sh index 02c799649..4b0ee7d9f 100755 --- a/po/update_po_files.sh +++ b/po/update_po_files.sh @@ -28,6 +28,8 @@ while read FILENAME; do msgmerge "$FILENAME".old "$POT_FILENAME" > "$FILENAME" if [ "$?" -ne "0" ]; then echo "Could not merge \"$FILENAME.old\"." + else + rm "$FILENAME".old fi else echo "Could not rename \"$FILENAME\". File skipped." |
