Commit 82504f3a authored by Xavier Thompson's avatar Xavier Thompson

component/yarn: Make yarn shared

parent d85fa20c
......@@ -24,14 +24,19 @@ yarn-download = ${yarn-download-1.16.0:location}
yarn-download = ${yarn-download-1.3.2:location}
[yarn-wrapper]
recipe = slapos.recipe.template:jinja2
rendered = ${:location}/bin/yarn
template = inline:
recipe = slapos.recipe.build
shared = true
content =
#!/bin/sh
PATH=${nodejs:location}/bin/:$PATH
exec ${:yarn-download}/bin/yarn $@
location = ${buildout:parts-directory}/${:_buildout_section_name_}
bin-yarn = ${:rendered}
install =
import os
bin = os.path.join(options['location'], 'bin')
os.makedirs(bin)
with open(os.path.join(bin, 'yarn'), 'w') as f:
os.fchmod(f.fileno(), 0o755)
f.write(options['content'])
[yarn-download]
recipe = slapos.recipe.build:download-unpacked
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment