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.
This commit is contained in:
煎饼果子卷鲨鱼辣椒 2024-12-30 19:57:00 +08:00
parent d32476d827
commit 8f52929e59
2 changed files with 6 additions and 3 deletions

View File

@ -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"
)

View File

@ -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