From cb36c3b288a034ad4a1682d4b9d5d631f10930da Mon Sep 17 00:00:00 2001
From: Jacob Vosmaer <jacob@gitlab.com>
Date: Fri, 4 Aug 2017 11:19:20 +0200
Subject: [PATCH] Install yarn via apt in update guides

---
 doc/update/8.17-to-9.0.md | 5 ++++-
 doc/update/9.0-to-9.1.md  | 5 ++++-
 doc/update/9.1-to-9.2.md  | 5 ++++-
 doc/update/9.2-to-9.3.md  | 5 ++++-
 doc/update/9.3-to-9.4.md  | 5 ++++-
 5 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/doc/update/8.17-to-9.0.md b/doc/update/8.17-to-9.0.md
index 6308317b1f2..4d3ababaa41 100644
--- a/doc/update/8.17-to-9.0.md
+++ b/doc/update/8.17-to-9.0.md
@@ -65,7 +65,10 @@ Since 8.17, GitLab requires the use of yarn `>= v0.17.0` to manage
 JavaScript dependencies.
 
 ```bash
-curl --location https://yarnpkg.com/install.sh | bash -
+curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
+echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
+sudo apt-get update
+sudo apt-get install yarn
 ```
 
 More information can be found on the [yarn website](https://yarnpkg.com/en/docs/install).
diff --git a/doc/update/9.0-to-9.1.md b/doc/update/9.0-to-9.1.md
index 2d597894517..2b4a7bed27f 100644
--- a/doc/update/9.0-to-9.1.md
+++ b/doc/update/9.0-to-9.1.md
@@ -65,7 +65,10 @@ Since 8.17, GitLab requires the use of yarn `>= v0.17.0` to manage
 JavaScript dependencies.
 
 ```bash
-curl --location https://yarnpkg.com/install.sh | bash -
+curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
+echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
+sudo apt-get update
+sudo apt-get install yarn
 ```
 
 More information can be found on the [yarn website](https://yarnpkg.com/en/docs/install).
diff --git a/doc/update/9.1-to-9.2.md b/doc/update/9.1-to-9.2.md
index 225a4dcc924..f38547bba1a 100644
--- a/doc/update/9.1-to-9.2.md
+++ b/doc/update/9.1-to-9.2.md
@@ -65,7 +65,10 @@ Since 8.17, GitLab requires the use of yarn `>= v0.17.0` to manage
 JavaScript dependencies.
 
 ```bash
-curl --location https://yarnpkg.com/install.sh | bash -
+curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
+echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
+sudo apt-get update
+sudo apt-get install yarn
 ```
 
 More information can be found on the [yarn website](https://yarnpkg.com/en/docs/install).
diff --git a/doc/update/9.2-to-9.3.md b/doc/update/9.2-to-9.3.md
index 910539acc70..373f43eb3bb 100644
--- a/doc/update/9.2-to-9.3.md
+++ b/doc/update/9.2-to-9.3.md
@@ -65,7 +65,10 @@ Since 8.17, GitLab requires the use of yarn `>= v0.17.0` to manage
 JavaScript dependencies.
 
 ```bash
-curl --location https://yarnpkg.com/install.sh | bash -
+curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
+echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
+sudo apt-get update
+sudo apt-get install yarn
 ```
 
 More information can be found on the [yarn website](https://yarnpkg.com/en/docs/install).
diff --git a/doc/update/9.3-to-9.4.md b/doc/update/9.3-to-9.4.md
index 9540c36e7d0..b167f0737aa 100644
--- a/doc/update/9.3-to-9.4.md
+++ b/doc/update/9.3-to-9.4.md
@@ -65,7 +65,10 @@ Since 8.17, GitLab requires the use of yarn `>= v0.17.0` to manage
 JavaScript dependencies.
 
 ```bash
-curl --location https://yarnpkg.com/install.sh | bash -
+curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
+echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
+sudo apt-get update
+sudo apt-get install yarn
 ```
 
 More information can be found on the [yarn website](https://yarnpkg.com/en/docs/install).
-- 
GitLab