bundles/mautrix-telegram: use pkg_pip

This commit is contained in:
Franzi 2020-09-20 10:30:13 +02:00
parent eede422e9a
commit 3242d97cfa
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 16 additions and 12 deletions

View file

@ -6,16 +6,6 @@ actions = {
'directory:/opt/mautrix-telegram', # provided by bundle:users
},
},
'mautrix-telegram_install_bridge': {
# TODO find out how we can check if *this package* requires an update
'command': '/opt/mautrix-telegram/venv/bin/pip install --upgrade mautrix-telegram[all]',
'needs': {
'action:mautrix-telegram_create_virtualenv',
},
'triggers': {
'action:mautrix-telegram_upgrade_database',
},
},
'mautrix-telegram_init_alembic': {
'command': '/opt/mautrix-telegram/venv/bin/alembic -c /opt/mautrix-telegram/alembic.ini -x /opt/mautrix-telegram/config.yaml init /opt/mautrix-telegram/alembic',
'unless': 'test -d /opt/mautrix-telegram/alembic',
@ -34,6 +24,19 @@ actions = {
},
}
pkg_pip = {
'/opt/mautrix-telegram/venv/mautrix-telegram': {
'needs': {
'action:mautrix-telegram_create_virtualenv',
},
'triggers': {
'action:mautrix-telegram_upgrade_database',
'svc_systemd:mautrix-telegram:restart',
},
},
}
svc_systemd = {
'mautrix-telegram': {
'needs': {

View file

@ -1,7 +1,7 @@
groups['all'] = {
'member_patterns': (
'member_patterns': {
r".*",
),
},
'bundles': {
'apt',
'cron',
@ -31,5 +31,6 @@ groups['all'] = {
},
},
},
'pip_command': 'pip3',
}