29 lines
1.1 KiB
YAML
29 lines
1.1 KiB
YAML
|
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}
|
||
|
|