Skip to content

Commit 537fb37

Browse files
committed
fix: correct install script download URL and simplify installation
- Fix download URL to match actual GoReleaser asset naming (version without 'v' prefix) - Simplify installation to always use ~/.local/bin (modern standard, no sudo needed) - Tested and verified working with v0.6.7
1 parent ea98ce0 commit 537fb37

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

website/static/install.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ fi
4949

5050
echo "Latest release: $LATEST_RELEASE"
5151

52+
# Extract version without 'v' prefix for asset filename
53+
VERSION="${LATEST_RELEASE#v}"
54+
5255
# Construct download URL
53-
# Adjust the filename pattern to match your release assets
54-
# Example: comet_v1.0.0_darwin_amd64.tar.gz or comet_darwin_amd64.tar.gz
55-
DOWNLOAD_URL="https://github.com/$REPO/releases/download/$LATEST_RELEASE/${BINARY_NAME}_${OS}_${ARCH}.tar.gz"
56+
# GoReleaser creates archives like: comet_0.6.7_darwin_arm64.tar.gz
57+
# (version without 'v' prefix, even though tag is v0.6.7)
58+
# Windows uses .tar.gz for GoReleaser v2
59+
DOWNLOAD_URL="https://github.com/$REPO/releases/download/$LATEST_RELEASE/${BINARY_NAME}_${VERSION}_${OS}_${ARCH}.tar.gz"
5660

5761
echo "Downloading from: $DOWNLOAD_URL"
5862

@@ -64,15 +68,9 @@ trap 'rm -rf "$TMP_DIR"' EXIT
6468
curl -fsSL "$DOWNLOAD_URL" | tar -xz -C "$TMP_DIR"
6569

6670
# Determine installation directory
67-
if [ -w "/usr/local/bin" ]; then
68-
INSTALL_DIR="/usr/local/bin"
69-
elif [ -d "$HOME/.local/bin" ]; then
70-
INSTALL_DIR="$HOME/.local/bin"
71-
else
72-
# Create ~/.local/bin if it doesn't exist
73-
INSTALL_DIR="$HOME/.local/bin"
74-
mkdir -p "$INSTALL_DIR"
75-
fi
71+
# Prefer ~/.local/bin (modern standard, no sudo needed)
72+
INSTALL_DIR="$HOME/.local/bin"
73+
mkdir -p "$INSTALL_DIR"
7674

7775
echo "Installing to: $INSTALL_DIR"
7876

0 commit comments

Comments
 (0)