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} ...@@ -24,14 +24,19 @@ yarn-download = ${yarn-download-1.16.0:location}
yarn-download = ${yarn-download-1.3.2:location} yarn-download = ${yarn-download-1.3.2:location}
[yarn-wrapper] [yarn-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.build
rendered = ${:location}/bin/yarn shared = true
template = inline: content =
#!/bin/sh #!/bin/sh
PATH=${nodejs:location}/bin/:$PATH PATH=${nodejs:location}/bin/:$PATH
exec ${:yarn-download}/bin/yarn $@ exec ${:yarn-download}/bin/yarn $@
location = ${buildout:parts-directory}/${:_buildout_section_name_} install =
bin-yarn = ${:rendered} 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] [yarn-download]
recipe = slapos.recipe.build:download-unpacked 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