diff --git a/bundles/ldap-frontend/items.py b/bundles/ldap-frontend/items.py index e8c0a23..e000262 100644 --- a/bundles/ldap-frontend/items.py +++ b/bundles/ldap-frontend/items.py @@ -8,6 +8,7 @@ git_deploy = { 'rev': 'main', 'triggers': { 'action:ldap-frontend_install_deps', + 'action:ldap-frontend_compile_translations', 'svc_systemd:ldap-frontend:restart', }, }, @@ -31,6 +32,16 @@ actions = { 'action:ldap-frontend_make_virtualenv', }, }, + 'ldap-frontend_compile_translations': { + 'triggered': True, + 'command': ' && '.join([ + 'cd /opt/ldap-frontend/src/ldap_frontend', + '/opt/ldap-frontend/venv/bin/pybabel compile -d translations', + ]), + 'needs': { + 'action:ldap-frontend_install_deps', + }, + }, } files = { @@ -53,6 +64,7 @@ svc_systemd = { 'ldap-frontend': { 'needs': { 'action:ldap-frontend_install_deps', + 'action:ldap-frontend_compile_translations', 'file:/etc/systemd/system/ldap-frontend.service', 'file:/opt/ldap-frontend/config.json', },