From 81623ca6d3a8c66b94af57ba656d013a4eeab22a Mon Sep 17 00:00:00 2001 From: Jatin K Malik Date: Sat, 14 Mar 2026 14:01:19 -0700 Subject: [PATCH] fix(install): dynamically resolve latest release tag via GitHub API (#313) --- install.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index ebe1508..388e866 100755 --- a/install.sh +++ b/install.sh @@ -174,7 +174,7 @@ while [[ $# -gt 0 ]]; do echo " --test Run tests after installation" echo " --venv-dir=PATH Specify custom virtual environment directory" echo " --skip-models Skip downloading speech models during installation" - echo " --tag=TAG Install specific release tag (default: v0.8.0-beta)" + echo " --tag=TAG Install specific release tag (default: latest release)" echo " --help Show this help message" echo "" echo "Examples:" @@ -215,7 +215,24 @@ echo "" check_running_processes -INSTALL_TAG="${INSTALL_TAG:-v0.8.0-beta}" +resolve_install_tag() { + if [ -n "$INSTALL_TAG" ]; then + return + fi + if command_exists curl; then + local latest + latest=$(curl -fsSL --connect-timeout 5 \ + "https://api.github.com/repos/jatinkrmalik/vocalinux/releases/latest" \ + 2>/dev/null | grep '"tag_name"' | head -1 | cut -d'"' -f4) + if [ -n "$latest" ]; then + INSTALL_TAG="$latest" + return + fi + fi + INSTALL_TAG="v0.9.0-beta" +} + +resolve_install_tag # Check if running from within the vocalinux repo or remotely (via curl) REPO_URL="https://github.com/jatinkrmalik/vocalinux.git" @@ -1073,7 +1090,7 @@ if [[ "$INTERACTIVE_MODE" == "yes" ]]; then if [ ! -t 0 ]; then print_error "Interactive mode requires a terminal (TTY)." print_error "Please run from a terminal, or use automatic mode:" - print_error " curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/v0.8.0-beta/install.sh | bash" + print_error " curl -fsSL https://raw.githubusercontent.com/jatinkrmalik/vocalinux/main/install.sh | bash" exit 1 fi