Modifed node version check (#178)

This commit is contained in:
Chalith Desaman
2022-08-31 16:26:47 +05:30
committed by GitHub
parent fe6cabf4c2
commit eefbbfac61
4 changed files with 9 additions and 7 deletions

View File

@@ -44,9 +44,10 @@ if ! command -v node &>/dev/null; then
curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt-get -y install nodejs
else
version=$(node -v)
if [[ ! $version =~ v16\..* ]]; then
echo "Found node $version, recommended node v16.x.x"
version=$(node -v | cut -d '.' -f1)
version=${version:1}
if [[ $version -lt 16 ]]; then
echo "Found node $version, recommended node v16.x.x or later"
fi
fi

View File

@@ -125,8 +125,9 @@ function GB() {
function check_prereq() {
# Check if node js installed.
if command -v node &>/dev/null; then
version=$(node -v)
if [[ ! $version =~ v16\..* ]]; then
version=$(node -v | cut -d '.' -f1)
version=${version:1}
if [[ $version -lt 16 ]]; then
echo "$evernode requires NodeJs 16.x or later. You system has NodeJs $version installed. Either remove the NodeJs installation or upgrade to NodeJs 16.x."
exit 1
fi

View File

@@ -24,7 +24,7 @@ appenv = {
ACQUIRE_LEASE_WAIT_TIMEOUT_THRESHOLD: 0.4,
ORPHAN_PRUNE_SCHEDULER_INTERVAL_HOURS: 4,
SASHI_CLI_PATH: appenv.IS_DEV_MODE ? "../build/sashi" : "/usr/bin/sashi",
MB_VERSION: '0.5.9',
MB_VERSION: '0.5.10',
TOS_HASH: '757A0237B44D8B2BBB04AE2BAD5813858E0AECD2F0B217075E27E0630BA74314' // This is the sha256 hash of TOS text.
}
Object.freeze(appenv);

View File

@@ -6,7 +6,7 @@
namespace version
{
// Sashimono agent version. Written to new configs.
constexpr const char *AGENT_VERSION = "0.5.9";
constexpr const char *AGENT_VERSION = "0.5.10";
// Minimum compatible config version (this will be used to validate configs).
constexpr const char *MIN_CONFIG_VERSION = "0.5.0";