diff --git a/bundles/mx-puppet-discord/items.py b/bundles/mx-puppet-discord/items.py index 6552d0c..8e17928 100644 --- a/bundles/mx-puppet-discord/items.py +++ b/bundles/mx-puppet-discord/items.py @@ -6,6 +6,10 @@ directories = { 'owner': 'mx-puppet-discord', 'group': 'mx-puppet-discord', }, + '/opt/mx-puppet-discord/.yarn': { + 'owner': 'mx-puppet-discord', + 'group': 'mx-puppet-discord', + }, '/opt/mx-puppet-discord/src': { 'owner': 'mx-puppet-discord', 'group': 'mx-puppet-discord', @@ -47,29 +51,31 @@ files = { git_deploy = { '/opt/mx-puppet-discord/src': { - 'repo': 'https://github.com/matrix-discord/mx-puppet-discord.git', - 'rev': node.metadata.get('mx-puppet-discord/version', 'master'), + 'repo': 'https://gitlab.com/mx-puppet/discord/mx-puppet-discord.git', + 'rev': node.metadata.get('mx-puppet-discord/version', 'main'), 'triggers': { 'action:mx-puppet-discord_chown', - 'action:mx-puppet-discord_npm_install', - 'action:mx-puppet-discord_npm_build', + 'action:mx-puppet-discord_yarn_install', + 'action:mx-puppet-discord_yarn_build', }, }, } actions = { 'mx-puppet-discord_chown': { - 'command': - 'chown -R mx-puppet-discord:mx-puppet-discord /opt/mx-puppet-discord/src && ' + 'command': ' && '.join([ 'chown -R mx-puppet-discord:mx-puppet-discord /opt/mx-puppet-discord/.npm', + 'chown -R mx-puppet-discord:mx-puppet-discord /opt/mx-puppet-discord/.yarn', + 'chown -R mx-puppet-discord:mx-puppet-discord /opt/mx-puppet-discord/src', + ]), 'needs': { 'directory:/opt/mx-puppet-discord/.npm', 'user:mx-puppet-discord', }, 'triggered': True, }, - 'mx-puppet-discord_npm_install': { - 'command': 'cd /opt/mx-puppet-discord/src && sudo -u mx-puppet-discord npm install', + 'mx-puppet-discord_yarn_install': { + 'command': 'cd /opt/mx-puppet-discord/src && sudo -u mx-puppet-discord yarn install', 'needs': { 'action:mx-puppet-discord_chown', 'pkg_apt:nodejs', @@ -77,10 +83,10 @@ actions = { }, 'triggered': True, }, - 'mx-puppet-discord_npm_build': { - 'command': 'cd /opt/mx-puppet-discord/src && sudo -u mx-puppet-discord npm run-script build', + 'mx-puppet-discord_yarn_build': { + 'command': 'cd /opt/mx-puppet-discord/src && sudo -u mx-puppet-discord yarn build', 'needs': { - 'action:mx-puppet-discord_npm_install', + 'action:mx-puppet-discord_yarn_install', }, 'triggers': { 'svc_systemd:mx-puppet-discord:restart', @@ -92,7 +98,7 @@ actions = { svc_systemd = { 'mx-puppet-discord': { 'needs': { - 'action:mx-puppet-discord_npm_build', + 'action:mx-puppet-discord_yarn_build', 'file:/etc/systemd/system/mx-puppet-discord.service', 'file:/opt/mx-puppet-discord/config.yaml', 'file:/opt/mx-puppet-discord/registration.yaml', diff --git a/nodes/rx300.py b/nodes/rx300.py index 3d4f80f..f1649b6 100644 --- a/nodes/rx300.py +++ b/nodes/rx300.py @@ -281,8 +281,6 @@ nodes['rx300'] = { 'domain': 'rss.franzi.business', }, 'mx-puppet-discord': { - # https://github.com/matrix-discord/mx-puppet-discord/issues/201 - 'version': '46051012ec3d4e21bd9febc2519ce08f3e13f5e0', 'homeserver': { 'domain': 'franzi.business', 'url': 'https://matrix.franzi.business',