Require a supported version of node to use Blueprint
This commit is contained in:
parent
f2814c92aa
commit
2d0dec0306
1 changed files with 11 additions and 18 deletions
29
blueprint.sh
29
blueprint.sh
|
@ -142,6 +142,17 @@ depend() {
|
|||
log_red '[FATAL] Required depencendy yarn is not installed or detected.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# End process when using an older Node.JS version.
|
||||
nodeVer=$(node -v)
|
||||
if [[ $nodeVer != "v17."* ]] &&
|
||||
[[ $nodeVer != "v18."* ]] &&
|
||||
[[ $nodeVer != "v19."* ]] &&
|
||||
[[ $nodeVer != "v20."* ]] &&
|
||||
[[ $nodeVer != "v21."* ]]; then
|
||||
log_red '[FATAL] Required depencency node is an unsupported version.' >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
@ -169,15 +180,6 @@ if [[ $1 != "-bash" ]]; then
|
|||
# Check if required programs are installed
|
||||
depend
|
||||
|
||||
# Warn if incorrect Node.JS version.
|
||||
nodeVer=$(node -v)
|
||||
if [[ $nodeVer != "v17."* ]] &&
|
||||
[[ $nodeVer != "v18."* ]] &&
|
||||
[[ $nodeVer != "v19."* ]] &&
|
||||
[[ $nodeVer != "v20."* ]]; then
|
||||
log_yellow "[WARNING] Your NodeJS version might not be compatible with Blueprint, expect errors."
|
||||
fi
|
||||
|
||||
# Update folder placeholder on PlaceholderService and admin layout.
|
||||
log_bright "[INFO] Updating folder placeholders.."
|
||||
sed -i "s!&bp.folder&!$FOLDER!g" $FOLDER/app/Services/Helpers/BlueprintPlaceholderService.php
|
||||
|
@ -264,15 +266,6 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then VCMD="y"
|
|||
# Check if required programs are installed
|
||||
depend
|
||||
|
||||
# Warn if incorrect Node.JS version.
|
||||
nodeVer=$(node -v)
|
||||
if [[ $nodeVer != "v17."* ]] &&
|
||||
[[ $nodeVer != "v18."* ]] &&
|
||||
[[ $nodeVer != "v19."* ]] &&
|
||||
[[ $nodeVer != "v20."* ]]; then
|
||||
log_yellow "[WARNING] Your NodeJS version might not be compatible with Blueprint, expect errors."
|
||||
fi
|
||||
|
||||
if [[ $3 == "test␀" ]]; then
|
||||
dev=true
|
||||
n="dev"
|
||||
|
|
Loading…
Reference in a new issue