Browse Source

build script: Check for minimum version of npm

pull/26/head
Starbeamrainbowlabs 4 years ago
parent
commit
a3cd55966a
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 11
      build

11
build

@ -16,11 +16,17 @@ lantern_path="./lantern-build-engine"; @@ -16,11 +16,17 @@ lantern_path="./lantern-build-engine";
###
# Put any custom settings here.
# Client-side build output
build_output_folder="./app";
# Database settings for ssh port forwarding task
database_host="db.connectedhumber.org";
database_name="aq_db";
# Minimum major version of npm
min_npm_version_major="6";
###############################################################################
# Check out the lantern git submodule if needed
@ -60,6 +66,11 @@ function task_setup { @@ -60,6 +66,11 @@ function task_setup {
check_command node true;
check_command composer true;
check_command npm true;
npm_version_major="$(npm --version | head -c 1)";
if [[ "${npm_version_major}" -lt "${min_npm_version_major}" ]]; then
echo "${FRED}${HC}Error: Your version of npm is too far out of date. You're running version $(npm --version), but version 6+ is required.";
fi
task_end $?;
task_begin "Initialising submodules";

Loading…
Cancel
Save