Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisInSky committed Dec 11, 2024
1 parent eedc0db commit 05f3c10
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions templates/check-version.rhai
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ let sails_cli_version_str = if variable::is_set("sails-cli-version") {
};
let sails_cli_version = parse_sem_ver(sails_cli_version_str);

if sails_cli_version[0] < sails_cli_min_version[0]
|| sails_cli_version[1] < sails_cli_min_version[1]
|| sails_cli_version[2] < sails_cli_min_version[2] {
abort("Sails CLI version '" + sails_cli_version_str + "' is not supported. Please upgrade to version '" + sails_cli_min_version_str + "' or higher");
if is_sem_ver_less(sails_cli_version, sails_cli_min_version) {
abort(`Sails CLI version '${sails_cli_version_str}' is not supported. Please upgrade to version '{sails_cli_min_version_str}' or higher`);
}

//
Expand Down Expand Up @@ -47,8 +45,9 @@ if is_sem_ver_less(sails_max_version, sails_version) {

variable::set("sails-rs-version", `${sails_version[0]}.${sails_version[1]}.${sails_version[2]}`);

print("Sails version: " + variable::get("sails-rs-version"));

//
// Functions
//
fn parse_sem_ver(version) {
let dot_idx = 0;
let dot_idx_next = index_of(version, ".", dot_idx);
Expand Down

0 comments on commit 05f3c10

Please sign in to comment.