Update version checks

pull/1623/merge^2
Marcel Klehr 2013-03-16 09:46:35 +01:00
parent a31605216f
commit 5a9393d5da
2 changed files with 3 additions and 3 deletions

View File

@ -44,8 +44,8 @@ fi
#check node version #check node version
NODE_VERSION=$(node --version) NODE_VERSION=$(node --version)
NODE_V_MINOR=$(echo $NODE_VERSION | cut -d "." -f 1-2) NODE_V_MINOR=$(echo $NODE_VERSION | cut -d "." -f 1-2)
if [ ! $NODE_V_MINOR = "v0.8" ] && [ ! $NODE_V_MINOR = "v0.6" ]; then if [ ! $NODE_V_MINOR = "v0.8" ] && [ ! $NODE_V_MINOR = "v0.6" && [ ! $NODE_V_MINOR = "v0.10" ]; then
echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.6.x or v0.8.x" >&2 echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.6.x, v0.8.x or v0.10.x" >&2
exit 1 exit 1
fi fi

View File

@ -8,7 +8,7 @@ cmd /C node -e "" || ( echo "Please install node.js ( http://nodejs.org )" && ex
echo _ echo _
echo Checking node version... echo Checking node version...
set check_version="if(['6','8'].indexOf(process.version.split('.')[1].toString()) === -1) { console.log('You are running a wrong version of Node. Etherpad Lite requires v0.6.x or v0.8.x'); process.exit(1) }" set check_version="if(['6','8','10'].indexOf(process.version.split('.')[1].toString()) === -1) { console.log('You are running a wrong version of Node. Etherpad Lite requires v0.6.x, v0.8.x or v0.10.x'); process.exit(1) }"
cmd /C node -e %check_version% || exit /B 1 cmd /C node -e %check_version% || exit /B 1
echo _ echo _