Skip to content

Commit 5034677

Browse files
committed
fix: make installer fetch latest version dynamically
- Remove hardcoded version from install.sh - Add get_latest_version() function using GitHub API - Installer now automatically downloads the latest release - Fixes issue where installer was stuck on v1.2.0
1 parent 2e9c63c commit 5034677

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

install.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,20 @@
55

66
set -e
77

8-
VERSION="1.2.0"
98
REPO="Aryamanraj/go-sol-sign"
9+
10+
# Function to get latest version from GitHub API
11+
get_latest_version() {
12+
curl -s "https://api.github.com/repos/${REPO}/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's/v//'
13+
}
14+
15+
# Get latest version dynamically
16+
VERSION=$(get_latest_version)
17+
if [[ -z "$VERSION" ]]; then
18+
echo "❌ Failed to fetch latest version. Using fallback version 1.2.0"
19+
VERSION="1.2.0"
20+
fi
21+
1022
BASE_URL="https://github.com/${REPO}/releases/download/v${VERSION}"
1123

1224
# Parse command line arguments

0 commit comments

Comments
 (0)