Skip to content
Snippets Groups Projects
Verified Commit 8d1044fc authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add Makefile for compiling messages

parent b00b9238
No related branches found
No related tags found
No related merge requests found
...@@ -13,16 +13,14 @@ build_dist: ...@@ -13,16 +13,14 @@ build_dist:
interruptible: true interruptible: true
stage: build stage: build
before_script: before_script:
- pip3 install poetry tox - pip3 install poetry babel
- apt update - apt -y update
- apt install sudo - apt -y install make
- id testuser || adduser --disabled-password --gecos "Test User" testuser
- chown -R testuser .
script: script:
- if ! [ x$CI_COMMIT_REF_NAME = x$CI_COMMIT_TAG ]; then - 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); poetry version $(poetry version | cut -d" " -f2)+$(date --date=${CI_COMMIT_TIMESTAMP} +%Y%m%d%H%M%S);
fi fi
- sudo -u testuser poetry build - make dist
artifacts: artifacts:
paths: paths:
- dist/ - dist/
......
Makefile 0 → 100644
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment