taskcluster/docker/recipes/install-node.sh
author Mark Banner <standard8@mozilla.com>
Tue, 25 Sep 2018 18:15:51 +0000
changeset 438163 951f04d1bb518e722e13b2a15580921590eb2b44
parent 407296 e0ea25f431fba96bfef29a02ea8f6688f919ca89
permissions -rw-r--r--
Bug 1482435 - Separate out nodejs finding logic from configure and use it for ESLint. r=firefox-build-system-reviewers,gps This extracts the current logic for finding nodejs into its own module in mozbuild. Configure and ESLint then use it. For ESLint, this will change the first location it looks for nodejs to be the .mozbuild directory. Differential Revision: https://phabricator.services.mozilla.com/D6430

#!/bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# This script installs Node v8.
# XXX For now, this should match the version installed in
# taskcluster/scripts/misc/repack-node.sh. Later we'll get the ESLint builder
# to use the linux64-node toolchain directly.

wget --progress=dot:mega https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x64.tar.xz
echo '08e2fcfea66746bd966ea3a89f26851f1238d96f86c33eaf6274f67fce58421a  node-v8.11.3-linux-x64.tar.xz' | sha256sum -c
tar -C /usr/local -xJ --strip-components 1 < node-v8.11.3-linux-x64.tar.xz
node -v  # verify
npm -v