diff --git a/bundles/hedgedoc/items.py b/bundles/hedgedoc/items.py index ac66fcb..8a0219e 100644 --- a/bundles/hedgedoc/items.py +++ b/bundles/hedgedoc/items.py @@ -1,3 +1,5 @@ +from semver import compare + repo.libs.tools.require_bundle(node, 'nodejs') git_deploy = { @@ -47,6 +49,21 @@ directories = { }, } +if compare(node.metadata.get('hedgedoc/version'), '1.9.7') <= 0: + command = ' && '.join([ + 'cd /opt/hedgedoc', + 'yarn install --production=true --pure-lockfile --ignore-scripts', + 'yarn install --ignore-scripts', + 'yarn build', + ]) +elif compare(node.metadata.get('hedgedoc/version'), '1.9.9') >= 0: + command = ' && '.join([ + 'cd /opt/hedgedoc', + 'bin/setup', + 'yarn install --immutable', + 'yarn build', + ]) + actions = { 'hedgedoc_yarn': { 'command': ' && '.join([ diff --git a/nodes/htz-cloud/miniserver.py b/nodes/htz-cloud/miniserver.py index fe29ddf..723c838 100644 --- a/nodes/htz-cloud/miniserver.py +++ b/nodes/htz-cloud/miniserver.py @@ -80,7 +80,7 @@ nodes['htz-cloud.miniserver'] = { }, }, 'hedgedoc': { - 'version': '1.9.7', + 'version': '1.9.8', 'config': { 'production': { 'allowAnonymousEdits': True, diff --git a/requirements.txt b/requirements.txt index 48687b3..7e81327 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ bundlewrap>=4.16.0 PyNaCl bundlewrap-pass +semver