]> git.mxchange.org Git - friendica-addons.git/blob - .drone.yml
added DE translation of the SAML addon
[friendica-addons.git] / .drone.yml
1 ---
2 kind: pipeline
3 type: docker
4 name: Check messages.po
5
6 clone:
7   disable: true
8
9 trigger:
10   event:
11     - pull_request
12
13 steps:
14   - name: clone friendica base
15     image: alpine/git
16     commands:
17       - git clone https://github.com/friendica/friendica.git .
18       - git checkout $DRONE_COMMIT_BRANCH
19   - name: clone friendica addon
20     image: alpine/git
21     commands:
22       - git clone $DRONE_REMOTE_URL addon
23       - git checkout $DRONE_COMMIT_REF
24   - name: Run default Xgettext
25     image: friendicaci/transifex
26     commands:
27       - export CHANGED_FILES=($(git diff --name-status ${DRONE_COMMIT_BEFORE}..${DRONE_COMMIT_AFTER} | grep ^A | cut -f2))
28       - export FIND_RESULT=$(printf "%s\n" "$CHANGED_FILES[@]" | sed '/^\./d' | cut -d "/" -f1 | uniq)
29       - for addon in $FIND_RESULT; do ./bin/run_xgettext.sh --addon $addon; done
30   - name: Check update necessary
31     image: alpine/git
32     commands:
33       - cd addon/
34       - if [[ $(git diff -U0 "**/messages.po" | awk '!/index|diff|\-\-\-|\+\+\+|@@|\-"POT-Creation-Date|\+"POT-Creation-Date|\+#|\-#/{print }' | wc -l) > 0 ]]; then
35           echo "::error file=messages.po::messages.po is out of date"
36           exit 1
37         else
38           echo "Nothing to update"
39         fi