bundlewrap/bundles/mautrix-whatsapp/items.py
Franziska Kunsmann 0a77b72cd3
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
update mautrix-whatsapp to 0.1.8
2021-08-07 18:57:31 +02:00

71 lines
1.8 KiB
Python

users = {
'mautrix-whatsapp': {
'home': '/opt/mautrix-whatsapp',
},
}
directories = {
'/opt/mautrix-whatsapp': {},
'/opt/mautrix-whatsapp/src': {},
'/opt/mautrix-whatsapp/logs': {
'owner': 'mautrix-whatsapp',
},
}
git_deploy = {
'/opt/mautrix-whatsapp/src': {
'repo': 'https://github.com/mautrix/whatsapp.git',
'rev': node.metadata.get('mautrix-whatsapp/version'),
'triggers': {
'action:mautrix-whatsapp_build',
'svc_systemd:mautrix-whatsapp:restart',
},
},
}
actions = {
'mautrix-whatsapp_build': {
'command': 'cd /opt/mautrix-whatsapp/src && GOMAXPROCS=$(nproc) go build',
'triggered': True,
'needs': {
'pkg_apt:golang-go',
},
},
}
svc_systemd = {
'mautrix-whatsapp': {
'needs': {
'action:mautrix-whatsapp_build',
'directory:/opt/mautrix-whatsapp/logs',
'file:/etc/systemd/system/mautrix-whatsapp.service',
'file:/opt/mautrix-whatsapp/config.yaml',
'postgres_db:mautrix-whatsapp',
'postgres_role:mautrix-whatsapp',
},
},
}
files = {
'/opt/mautrix-whatsapp/registration.yaml': {
'content_type': 'mako',
'triggers': {
'svc_systemd:mautrix-whatsapp:restart',
},
},
'/opt/mautrix-whatsapp/config.yaml': {
'content_type': 'mako',
'triggers': {
'svc_systemd:mautrix-whatsapp:restart',
},
},
'/etc/systemd/system/mautrix-whatsapp.service': {
'triggers': {
'action:systemd-reload',
'svc_systemd:mautrix-whatsapp:restart',
},
},
}
if node.has_bundle('matrix-synapse'):
files['/opt/mautrix-whatsapp/registration.yaml']['triggers'].add('svc_systemd:matrix-synapse:restart')