mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-12-26 11:05:01 +00:00
build script: Check for minimum version of npm
This commit is contained in:
parent
3c2605dcb9
commit
a3cd55966a
1 changed files with 11 additions and 0 deletions
11
build
11
build
|
@ -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 {
|
|||
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…
Reference in a new issue