Commit 1c70f8a4 authored by Jérome Perrin's avatar Jérome Perrin

component/yarn: add yarn 4.6.0

parent 9210eeba
......@@ -62,3 +62,30 @@ md5sum = db82fa09c996e9318f2f1d2ab99228f9
<= yarn-download
version = 1.16.0
md5sum = 46790033c23803387890f545e4040690
[yarn-berry-install]
recipe = slapos.recipe.build
shared = true
url = https://github.com/yarnpkg/berry/archive/refs/tags/@yarnpkg/cli/${:version}.tar.gz
content =
#!/bin/sh
PATH=${nodejs:location}/bin/:$PATH
exec %(location)s/scripts/bin/yarn $@
install =
import os
import subprocess
self.copyTree(guessworkdir(self.extract(self.download())), location)
bin = os.path.join(location, 'bin')
os.makedirs(bin)
yarn = os.path.join(bin, 'yarn')
with open(yarn, 'w') as f:
os.fchmod(f.fileno(), 0o755)
f.write(options['content'] % options)
# run a yarn command so that it finishes initialization before the installation directory
# is made read only.
subprocess.check_output([yarn, 'cache', 'clean'])
[yarn-4.6.0]
<= yarn-berry-install
version = 4.6.0
md5sum = aa26ce25aa0f214c75e2362a06e1cab0
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