mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 13:16:47 +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
|
if [[ -z "$branch" ]]; then
|
||||||
branch="main"
|
branch="main"
|
||||||
fi
|
fi
|
||||||
|
if [[ "$branch" != "main" ]]; then
|
||||||
|
branch="$(normalize_release_tag "$branch")"
|
||||||
|
fi
|
||||||
local url="https://github.com/tw93/mole/archive/refs/heads/main.tar.gz"
|
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
|
# 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
|
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() {
|
get_installed_version() {
|
||||||
local binary="$INSTALL_DIR/mole"
|
local binary="$INSTALL_DIR/mole"
|
||||||
if [[ -x "$binary" ]]; then
|
if [[ -x "$binary" ]]; then
|
||||||
|
|||||||
7
mole
7
mole
@@ -25,7 +25,7 @@ source "$SCRIPT_DIR/lib/core/common.sh"
|
|||||||
trap cleanup_temp_files EXIT INT TERM
|
trap cleanup_temp_files EXIT INT TERM
|
||||||
|
|
||||||
# Version info
|
# Version info
|
||||||
VERSION="1.15.10"
|
VERSION="1.16.0"
|
||||||
MOLE_TAGLINE="Deep clean and optimize your Mac."
|
MOLE_TAGLINE="Deep clean and optimize your Mac."
|
||||||
|
|
||||||
# Check TouchID configuration
|
# Check TouchID configuration
|
||||||
@@ -430,11 +430,12 @@ update_mole() {
|
|||||||
|
|
||||||
# Run installer with visible output (but capture for error handling)
|
# Run installer with visible output (but capture for error handling)
|
||||||
local install_output
|
local install_output
|
||||||
if install_output=$(MOLE_VERSION="V${latest}" "$tmp_installer" --prefix "$install_dir" --config "$HOME/.config/mole" --update 2>&1); then
|
local update_tag="V${latest#V}"
|
||||||
|
if install_output=$(MOLE_VERSION="$update_tag" "$tmp_installer" --prefix "$install_dir" --config "$HOME/.config/mole" --update 2>&1); then
|
||||||
process_install_output "$install_output"
|
process_install_output "$install_output"
|
||||||
else
|
else
|
||||||
# Retry without --update flag
|
# Retry without --update flag
|
||||||
if install_output=$(MOLE_VERSION="V${latest}" "$tmp_installer" --prefix "$install_dir" --config "$HOME/.config/mole" 2>&1); then
|
if install_output=$(MOLE_VERSION="$update_tag" "$tmp_installer" --prefix "$install_dir" --config "$HOME/.config/mole" 2>&1); then
|
||||||
process_install_output "$install_output"
|
process_install_output "$install_output"
|
||||||
else
|
else
|
||||||
if [[ -t 1 ]]; then stop_inline_spinner; fi
|
if [[ -t 1 ]]; then stop_inline_spinner; fi
|
||||||
|
|||||||
Reference in New Issue
Block a user