From 8f52929e59c8a41ad1b6a8b1c6fef075e10c70e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=85=8E=E9=A5=BC=E6=9E=9C=E5=AD=90=E5=8D=B7=E9=B2=A8?= =?UTF-8?q?=E9=B1=BC=E8=BE=A3=E6=A4=92?= Date: Mon, 30 Dec 2024 19:57:00 +0800 Subject: [PATCH] fix: update binary naming in installation scripts to remove 'v' prefix - Modified the installation scripts for both PowerShell and shell to remove the 'v' prefix from the latest release tag when constructing binary names. - This change ensures consistency in binary naming and improves compatibility with the expected format for asset retrieval. --- scripts/install.ps1 | 4 ++-- scripts/install.sh | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index bf50c85..8792208 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -103,8 +103,8 @@ function Install-CursorModifier { # Look for Windows binary with our architecture $possibleNames = @( - "cursor-id-modifier_$($latestRelease.tag_name)_windows_x86_64.exe", - "cursor-id-modifier_$($latestRelease.tag_name)_windows_$($arch).exe", + "cursor-id-modifier_$($latestRelease.tag_name.TrimStart('v'))_windows_x86_64.exe", + "cursor-id-modifier_$($latestRelease.tag_name.TrimStart('v'))_windows_$($arch).exe", "cursor-id-modifier_windows_$($arch).exe" ) diff --git a/scripts/install.sh b/scripts/install.sh index a437d6d..adc7881 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -86,8 +86,11 @@ main() { echo -e "${BLUE}Fetching latest release information...${NC}" LATEST_URL="https://api.github.com/repos/yuaotian/go-cursor-help/releases/latest" + # Get latest version and remove 'v' prefix + VERSION=$(curl -s "$LATEST_URL" | grep "tag_name" | cut -d'"' -f4 | sed 's/^v//') + # Construct binary name - BINARY_NAME="cursor-id-modifier_${latestRelease.tag_name}_${OS}_${ARCH}" + BINARY_NAME="cursor-id-modifier_${VERSION}_${OS}_${ARCH}" echo -e "${BLUE}Looking for asset: $BINARY_NAME${NC}" # Get download URL directly