Fix install script to match actual release asset filenames#104
Merged
Fix install script to match actual release asset filenames#104
Conversation
The script constructed archive filenames like `fizzy_3.0.3_linux_amd64.tar.gz` but actual release assets are bare binaries (`fizzy-linux-amd64`) with per-platform checksum files (`SHA256SUMS-linux-amd64.txt`). Also rejects unsupported Windows ARM64 with a clear message instead of a cryptic 404. Fixes #103
There was a problem hiding this comment.
Pull request overview
Updates the scripts/install.sh curl-based installer to download the correct release artifact names and checksum files, and to handle unsupported platforms more clearly.
Changes:
- Switches installer downloads from versioned archives to expected “bare binary” asset names.
- Updates checksum download filename and simplifies checksum parsing.
- Removes archive extraction and adds an early error for Windows ARM64.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+37
to
45
| # Download binary | ||
| BINARY_NAME="fizzy-${OS}-${ARCH}" | ||
| if [ "$OS" = "windows" ]; then | ||
| EXT="zip" | ||
| BINARY_NAME="fizzy-${OS}-${ARCH}.exe" | ||
| fi | ||
|
|
||
| ARCHIVE="fizzy_${VERSION#v}_${OS}_${ARCH}.${EXT}" | ||
| DOWNLOAD_URL="https://github.com/$REPO/releases/download/${VERSION}/${ARCHIVE}" | ||
| CHECKSUMS_URL="https://github.com/$REPO/releases/download/${VERSION}/checksums.txt" | ||
| DOWNLOAD_URL="https://github.com/$REPO/releases/download/${VERSION}/${BINARY_NAME}" | ||
| CHECKSUMS_URL="https://github.com/$REPO/releases/download/${VERSION}/SHA256SUMS-${OS}-${ARCH}.txt" | ||
|
|
| echo "Verifying checksum..." | ||
| cd "$TMPDIR" | ||
| EXPECTED=$(awk -v f="$ARCHIVE" '$2 == f {print $1}' checksums.txt) | ||
| EXPECTED=$(awk '{print $1}' checksums.txt) |
Comment on lines
69
to
72
| echo "Checksum verified." | ||
|
|
||
| # Verify cosign signature (if cosign available) | ||
| if command -v cosign >/dev/null 2>&1; then | ||
| SIG_URL="https://github.com/$REPO/releases/download/${VERSION}/checksums.txt.sig" | ||
| CERT_URL="https://github.com/$REPO/releases/download/${VERSION}/checksums.txt.pem" | ||
| if curl -fsSL "$SIG_URL" -o checksums.txt.sig 2>/dev/null && \ | ||
| curl -fsSL "$CERT_URL" -o checksums.txt.pem 2>/dev/null; then | ||
| echo "Verifying cosign signature..." | ||
| if cosign verify-blob \ | ||
| --certificate checksums.txt.pem \ | ||
| --signature checksums.txt.sig \ | ||
| --certificate-identity-regexp="https://github.com/$REPO/.github/workflows/release.yml@refs/tags/" \ | ||
| --certificate-oidc-issuer="https://token.actions.githubusercontent.com" \ | ||
| checksums.txt 2>/dev/null; then | ||
| echo "Signature verified." | ||
| else | ||
| echo "ERROR: Signature verification failed" | ||
| exit 1 | ||
| fi | ||
| fi | ||
| fi | ||
|
|
||
| # Extract | ||
| echo "Extracting..." | ||
| if [ "$EXT" = "zip" ]; then | ||
| unzip -q "$ARCHIVE" -d extract | ||
| else | ||
| mkdir -p extract | ||
| tar -xzf "$ARCHIVE" -C extract | ||
| fi | ||
|
|
||
| # Install | ||
| mkdir -p "$INSTALL_DIR" |
Comment on lines
+23
to
+27
| if [ "$OS" = "windows" ] && [ "$ARCH" = "arm64" ]; then | ||
| echo "Windows ARM64 is not currently supported. See https://github.com/basecamp/fizzy-cli/releases for available builds." | ||
| exit 1 | ||
| fi | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This aligns install script with current binaries (3.0.3) - the install script will need to be redone once new binaries are created when v4 ships.
fizzy_{version}_{os}_{arch}.tar.gztofizzy-{os}-{arch}to match actual release assetschecksums.txttoSHA256SUMS-{os}-{arch}.txtFixes #103
Summary by cubic
Fix install script to match actual release asset names and per-platform checksum files, and remove archive handling. This prevents 404s and ensures checksum verification works.
fizzy-{os}-{arch}(or.exeon Windows) instead of archived filenames.SHA256SUMS-{os}-{arch}.txtand compare the single hash.Written for commit 35d39b7. Summary will update on new commits.