Skip to content

Commit beb9679

Browse files
committed
Add v prefix
1 parent f4e4d00 commit beb9679

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ get_version() {
8282
else
8383
info "No version specified. Fetching the latest version from crates.io..."
8484
CRATES_API_URL="https://crates.io/api/v1/crates/${CARGO_PKG_NAME}"
85-
VERSION=$(curl -sL "$CRATES_API_URL" | grep -o '"max_version":"[^"]*"' | head -1 | sed 's/"max_version":"\([^"]*\)"/\1/')
85+
VERSION="v$(curl -sL "$CRATES_API_URL" | grep -o '"max_version":"[^"]*"' | head -1 | sed 's/"max_version":"\([^"]*\)"/\1/')"
8686

8787
if [ -z "$VERSION" ]; then
8888
error "Could not determine the latest version from crates.io. Please check the crate name."
@@ -93,7 +93,7 @@ get_version() {
9393

9494
download_and_install() {
9595
ASSET_NAME="${BINARY_NAME}_${OS}_${ARCH}"
96-
DOWNLOAD_URL="https://github.com/${GH_OWNER}/${GH_REPO}/releases/download/router%2Fv${VERSION}/${ASSET_NAME}"
96+
DOWNLOAD_URL="https://github.com/${GH_OWNER}/${GH_REPO}/releases/download/router%2F${VERSION}/${ASSET_NAME}"
9797

9898
info "Downloading binary from: ${DOWNLOAD_URL}"
9999

0 commit comments

Comments
 (0)