Skip to content

Commit

Permalink
fix: Removed unused function.
Browse files Browse the repository at this point in the history
  • Loading branch information
vahid-haghighat committed Dec 1, 2024
1 parent bcabba3 commit ec21220
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions lib/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,24 +152,6 @@ function check_dependencies() {
fi;
};

function generate_regex_for_latest_allowed_stable() {
local constraint="$1"

# Extract major, minor, patch, and optional pre-release tag
local major minor patch pre_release
IFS='.-' read -r major minor patch pre_release <<< "$constraint"

# Start building the regex pattern
local regex="^${major}\."
regex+="("
regex+="${minor}\.${patch}-${pre_release}"
regex+="|$(seq 0 $(($minor - 1)) | sed 's/[0-9]*/&\.[0-9]+|/g' | tr -d '\n')"
regex="${regex%|}"
regex+=")$"

echo "$regex"
}

export -f check_dependencies;

source "$TFENV_ROOT/lib/tfenv-exec.sh";
Expand Down

0 comments on commit ec21220

Please sign in to comment.