add auto po->tl builds
This commit is contained in:
parent
01d322accb
commit
a53c3d7a8e
28
.woodpecker.yml
Normal file
28
.woodpecker.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
pipeline:
|
||||
build:
|
||||
image: debian
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install -y git gettext python3 libgl1 zip
|
||||
- git clone https://lab.encryptionin.space/Queerscriptors/rttk-queerscriptors.git
|
||||
- git clone https://lab.encryptionin.space/Queerscriptors/renpy.git
|
||||
- git clone -b game ${CI_REPO_REMOTE} ./game-source
|
||||
- >
|
||||
for file in ./game-*.po; do
|
||||
file2=$${file%.po}
|
||||
langcc=$${file2#\.\/game\-}
|
||||
stats=$(msgfmt --statistics $${file} 2>&1)
|
||||
numdone=$(echo $${stats%* translated*})
|
||||
echo $stats $numdone
|
||||
if [ $numdone -le 5680 ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
msgfmt "$file" -o game.mo
|
||||
PATH=$(pwd)/renpy:$${PATH} RENPY_DIR=$(pwd)/renpy python3 rttk-queerscriptors/mo2tl.py $(pwd)/game-source game.mo $${langcc}
|
||||
zip "$${langcc}.zip" game-source/game/tl/$${langcc}/*
|
||||
mv "$${langcc}.zip" "/var/www/queer/build/${CI_REPO_NAME}/$${langcc}.zip"
|
||||
done
|
||||
volumes:
|
||||
- /var/www/queer/build/${CI_REPO_NAME}:/var/www/queer/build/${CI_REPO_NAME}
|
||||
|
Loading…
Reference in a new issue