From 22af1ae7e79c2023f345fdf4e99a432ce0254944 Mon Sep 17 00:00:00 2001 From: A Ibrahim Date: Wed, 8 Apr 2026 15:17:20 +0200 Subject: [PATCH] fix: use release asset URLs for install scripts Point install script URLs to GitHub releases/latest/download/ instead of raw.githubusercontent.com/main/ so users always get the script matching the latest release, not whatever is on main. Co-Authored-By: Claude Opus 4.6 (1M context) --- INSTALL.md | 8 ++++---- scripts/install.ps1 | 2 +- scripts/install.sh | 2 +- src/utils/update-check.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 8b40546..9d2ad76 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -37,7 +37,7 @@ No dependencies required. Downloads a self-contained executable. ### macOS / Linux ```sh -curl -fsSL https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.sh | sh +curl -fsSL https://github.com/tigrisdata/cli/releases/latest/download/install.sh | sh ``` #### Options @@ -50,7 +50,7 @@ curl -fsSL https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install Example: ```sh -TIGRIS_VERSION=v2.9.0 curl -fsSL https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.sh | sh +TIGRIS_VERSION=v2.9.0 curl -fsSL https://github.com/tigrisdata/cli/releases/latest/download/install.sh | sh ``` #### Uninstall (macOS / Linux) @@ -66,7 +66,7 @@ If you used a custom `TIGRIS_INSTALL_DIR`, remove from that directory instead an ### Windows (PowerShell) ```powershell -irm https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.ps1 | iex +irm https://github.com/tigrisdata/cli/releases/latest/download/install.ps1 | iex ``` #### Options @@ -79,7 +79,7 @@ irm https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.ps1 | Example: ```powershell -$env:TIGRIS_VERSION = "v2.9.0"; irm https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.ps1 | iex +$env:TIGRIS_VERSION = "v2.9.0"; irm https://github.com/tigrisdata/cli/releases/latest/download/install.ps1 | iex ``` #### Uninstall (Windows) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 1ae03b8..5b67d77 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -1,5 +1,5 @@ # Tigris CLI installer for Windows -# Usage: irm https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.ps1 | iex +# Usage: irm https://github.com/tigrisdata/cli/releases/latest/download/install.ps1 | iex # # Environment variables: # TIGRIS_INSTALL_DIR - Installation directory (default: $HOME\.tigris\bin) diff --git a/scripts/install.sh b/scripts/install.sh index dcce1dd..b815b18 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,6 +1,6 @@ #!/bin/sh # Tigris CLI installer -# Usage: curl -fsSL https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.sh | sh +# Usage: curl -fsSL https://github.com/tigrisdata/cli/releases/latest/download/install.sh | sh # # Environment variables: # TIGRIS_INSTALL_DIR - Installation directory (default: /usr/local/bin) diff --git a/src/utils/update-check.ts b/src/utils/update-check.ts index fb06950..7911e53 100644 --- a/src/utils/update-check.ts +++ b/src/utils/update-check.ts @@ -116,9 +116,9 @@ export function getUpdateCommand(): string { } else if (isHomebrewInstall()) { return 'brew upgrade tigris'; } else if (isWindows) { - return 'irm https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.ps1 | iex'; + return 'irm https://github.com/tigrisdata/cli/releases/latest/download/install.ps1 | iex'; } else { - return 'curl -fsSL https://raw.githubusercontent.com/tigrisdata/cli/main/scripts/install.sh | sh'; + return 'curl -fsSL https://github.com/tigrisdata/cli/releases/latest/download/install.sh | sh'; } }