36 lines
868 B
Python
36 lines
868 B
Python
from bundlewrap.metadata import metadata_to_json
|
|
|
|
repo.libs.tools.require_bundle(node, 'nodejs')
|
|
|
|
directories = {
|
|
'/opt/element-web': {}
|
|
}
|
|
|
|
git_deploy = {
|
|
'/opt/element-web': {
|
|
'rev': node.metadata['element-web']['version'],
|
|
'repo': 'https://github.com/vector-im/element-web.git',
|
|
'triggers': {
|
|
'action:element-web_yarn',
|
|
},
|
|
},
|
|
}
|
|
|
|
files = {
|
|
'/opt/element-web/webapp/config.json': {
|
|
'content': metadata_to_json(node.metadata['element-web']['config']),
|
|
'needs': {
|
|
'action:element-web_yarn',
|
|
},
|
|
},
|
|
}
|
|
|
|
actions = {
|
|
'element-web_yarn': {
|
|
'command': 'cd /opt/element-web && npm install yarn && node_modules/yarn/bin/yarn install && node_modules/yarn/bin/yarn build',
|
|
'needs': {
|
|
'pkg_apt:nodejs',
|
|
},
|
|
'triggered': True,
|
|
},
|
|
}
|