aboutsummaryrefslogtreecommitdiffstats
path: root/testing/yarn
diff options
context:
space:
mode:
authorEd Robinson <ed.robinson@reevoo.com>2017-02-01 02:34:36 +0000
committerJakub Jirutka <jakub@jirutka.cz>2017-02-03 04:44:12 +0100
commita3a3a8927ba317b9b7a24afdf01be25f32cd049f (patch)
treedfd880435958b10127d0150b9db0e41122caf547 /testing/yarn
parent0ca02114a9bd6ebabc797b9ba5c6f939b6a5afe6 (diff)
testing/yarn: add installationMethod key to package.json
requested upstream https://github.com/yarnpkg/yarn/issues/1326#issuecomment-276454732
Diffstat (limited to 'testing/yarn')
-rw-r--r--testing/yarn/APKBUILD12
-rw-r--r--testing/yarn/add-apk-install-method.patch39
2 files changed, 47 insertions, 4 deletions
diff --git a/testing/yarn/APKBUILD b/testing/yarn/APKBUILD
index ddae57808a5..5dbc2db16fc 100644
--- a/testing/yarn/APKBUILD
+++ b/testing/yarn/APKBUILD
@@ -8,7 +8,8 @@ url="https://yarnpkg.com/"
arch="noarch"
license="BSD-2"
depends="nodejs"
-source="https://yarnpkg.com/downloads/$pkgver/$pkgname-v$pkgver.tar.gz"
+source="https://yarnpkg.com/downloads/$pkgver/$pkgname-v$pkgver.tar.gz
+ add-apk-install-method.patch"
builddir="$srcdir/dist"
prepare() {
@@ -46,6 +47,9 @@ package() {
ln -s /$destdir/bin/yarn "$pkgdir"/usr/bin/yarn
ln -s /$destdir/bin/yarn "$pkgdir"/usr/bin/yarnpkg
}
-md5sums="12df75bdb018b0412580ccc5ffee5c6e yarn-v0.20.0.tar.gz"
-sha256sums="4622f3c7a2fdf0dac3ef38b49eb636b813734e06a5a688fb2545df857792ebe3 yarn-v0.20.0.tar.gz"
-sha512sums="9f1a63b7e41a52059b3f30c029b4c249e44c24a7a48dc55bec2806009fcd725b39205fd8b4c292bc19fa968b0694d692616610cf038de2c50d2f91dbb7ab7bb8 yarn-v0.20.0.tar.gz"
+md5sums="12df75bdb018b0412580ccc5ffee5c6e yarn-v0.20.0.tar.gz
+4c15d156298c24d76ca16961b55ec2c0 add-apk-install-method.patch"
+sha256sums="4622f3c7a2fdf0dac3ef38b49eb636b813734e06a5a688fb2545df857792ebe3 yarn-v0.20.0.tar.gz
+fd2b4c0d38f15a9a0f28e4619ceb3361d0bc3ac600ce7886476a62bef3a63e37 add-apk-install-method.patch"
+sha512sums="9f1a63b7e41a52059b3f30c029b4c249e44c24a7a48dc55bec2806009fcd725b39205fd8b4c292bc19fa968b0694d692616610cf038de2c50d2f91dbb7ab7bb8 yarn-v0.20.0.tar.gz
+9dcf2496d2c9f8a36db915cb6433aad449abbcc2503855c7b2afe9b3cce024f76da0ab4daf44bc42df97595748c7bea38900d91a4d28e344ffc83eec8a212a9f add-apk-install-method.patch"
diff --git a/testing/yarn/add-apk-install-method.patch b/testing/yarn/add-apk-install-method.patch
new file mode 100644
index 00000000000..a6bc443aa8a
--- /dev/null
+++ b/testing/yarn/add-apk-install-method.patch
@@ -0,0 +1,39 @@
+diff -urp dist/lib/cli/commands/install.js patched/lib/cli/commands/install.js
+--- dist/lib/cli/commands/install.js 2017-02-01 00:36:23.000000000 +0000
++++ patched/lib/cli/commands/install.js 2017-02-01 01:25:41.000000000 +0000
+@@ -226,6 +226,10 @@ function getUpdateCommand() {
+ return 'choco upgrade yarn';
+ }
+
++ if (YARN_INSTALL_METHOD === 'apk') {
++ return 'apk update && apk add -u yarn';
++ }
++
+ return null;
+ }
+
+diff -urp dist/lib-legacy/cli/commands/install.js patched/lib-legacy/cli/commands/install.js
+--- dist/lib-legacy/cli/commands/install.js 2017-01-30 14:13:43.000000000 +0000
++++ patched/lib-legacy/cli/commands/install.js 2017-02-01 01:32:32.000000000 +0000
+@@ -238,6 +238,10 @@ function getUpdateCommand() {
+ return 'choco upgrade yarn';
+ }
+
++ if (YARN_INSTALL_METHOD === 'apk') {
++ return 'apk update && apk add -u yarn';
++ }
++
+ return null;
+ }
+
+diff -urp dist/package.json patched/package.json
+--- dist/package.json 2017-02-01 01:23:37.000000000 +0000
++++ patched/package.json 2017-02-01 01:23:50.000000000 +0000
+@@ -1,6 +1,6 @@
+ {
+ "name": "yarn",
+- "installationMethod": "tar",
++ "installationMethod": "apk",
+ "version": "0.20.0",
+ "license": "BSD-2-Clause",
+ "preferGlobal": true,