diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25b29a470f0a4689c5dbc91a4664b80f32f1cde0..74fd5405722fac5807a902525919c0f3cdee28c9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,16 +13,14 @@ build_dist: interruptible: true stage: build before_script: - - pip3 install poetry tox - - apt update - - apt install sudo - - id testuser || adduser --disabled-password --gecos "Test User" testuser - - chown -R testuser . + - pip3 install poetry babel + - apt -y update + - apt -y install make script: - if ! [ x$CI_COMMIT_REF_NAME = x$CI_COMMIT_TAG ]; then poetry version $(poetry version | cut -d" " -f2)+$(date --date=${CI_COMMIT_TIMESTAMP} +%Y%m%d%H%M%S); fi - - sudo -u testuser poetry build + - make dist artifacts: paths: - dist/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..1723a9b4415f2aafe5524bd9c8bbd1f6d95f5caa --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +messages.pot: pelican_theme_teckids/templates/*.html babel.cfg + pybabel extract --mapping babel.cfg --output messages.pot + +pelican_theme_teckids/translations/en/LC_MESSAGES/messages.po: messages.pot + pybabel update --input-file messages.pot --output-dir pelican_theme_teckids/translations/ --locale en --domain messages + +pelican_theme_teckids/translations/en/LC_MESSAGES/messages.mo: pelican_theme_teckids/translations/en/LC_MESSAGES/messages.po + pybabel compile --directory pelican_theme_teckids/translations/ --domain messages + +dist: pelican_theme_teckids/translations/en/LC_MESSAGES/messages.mo + poetry build + +.PHONY: dist