mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 12:06:45 +00:00
feat: bump version to 1.16.0 and normalize release tags in the installer for consistent version handling.
This commit is contained in:
12
install.sh
12
install.sh
@@ -144,6 +144,9 @@ resolve_source_dir() {
|
||||
if [[ -z "$branch" ]]; then
|
||||
branch="main"
|
||||
fi
|
||||
if [[ "$branch" != "main" ]]; then
|
||||
branch="$(normalize_release_tag "$branch")"
|
||||
fi
|
||||
local url="https://github.com/tw93/mole/archive/refs/heads/main.tar.gz"
|
||||
|
||||
# If a specific version is requested (e.g. V1.0.0), use the tag URL
|
||||
@@ -233,6 +236,15 @@ get_latest_release_tag_from_git() {
|
||||
tail -n 1
|
||||
}
|
||||
|
||||
normalize_release_tag() {
|
||||
local tag="$1"
|
||||
tag="${tag#v}"
|
||||
tag="${tag#V}"
|
||||
if [[ -n "$tag" ]]; then
|
||||
printf 'V%s\n' "$tag"
|
||||
fi
|
||||
}
|
||||
|
||||
get_installed_version() {
|
||||
local binary="$INSTALL_DIR/mole"
|
||||
if [[ -x "$binary" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user