summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2021-10-01 12:03:00 +0200
committerOskar Nyberg <oskar@mullvad.net>2021-10-01 15:51:47 +0200
commit1e5d68ce0d930e32a034ab3338b6cdb6c4827ead (patch)
treee8bf327229dd19d130355188467af3060314ff02
parent7feeb5252d8f76ca7823b2e7f8c340e8a7e802e7 (diff)
downloadmullvadvpn-1e5d68ce0d930e32a034ab3338b6cdb6c4827ead.tar.xz
mullvadvpn-1e5d68ce0d930e32a034ab3338b6cdb6c4827ead.zip
Add .nvmrc and use nvm install in buildserver build script
-rw-r--r--.nvmrc1
-rw-r--r--README.md10
-rwxr-xr-xci/buildserver-build.sh5
3 files changed, 13 insertions, 3 deletions
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 0000000000..28ebe8b4db
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+16.5.0
diff --git a/README.md b/README.md
index 2b7cc3c29b..cf6246e138 100644
--- a/README.md
+++ b/README.md
@@ -265,8 +265,14 @@ storePassword = keystore-password
1. *This can be skipped for Android builds*.
- Get the latest version 16 release of Node.js and the latest version of npm. After installing
- Node.js the latest version of npm can be installed by running:
+ Get the latest version 16 release of Node.js and the latest version of npm. The Node.js version
+ is specified in `.nvmrc` and can be installed by running the following from any directory within
+ this repository:
+ ```
+ nvm install --latest-npm
+ ```
+
+ If installing Node.js manually then the latest version of npm can be installed by running:
```
npm install -g npm
```
diff --git a/ci/buildserver-build.sh b/ci/buildserver-build.sh
index 84d303a1ef..802a45ddc0 100755
--- a/ci/buildserver-build.sh
+++ b/ci/buildserver-build.sh
@@ -101,8 +101,11 @@ build_ref() {
git submodule update
git clean -df
- # Make sure we have the latest Rust toolchain before the build
+ # Make sure we have the latest Rust and Node toolchains before the build
rustup update
+ if command -v nvm > /dev/null; then
+ nvm install --latest-npm
+ fi
./build.sh || return 0
case "$(uname -s)" in