Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,79 @@ release-update-homebrew-tap version tap_path:
echo "Committed qn {{version}} to {{tap_path}}. To publish:"
echo " git -C {{tap_path}} push"

# Manually update the Scoop bucket with a manifest for a given release.
# Use this until we have a SCOOP_BUCKET_TOKEN secret and can automate the
# push — at which point a CI job takes over and this recipe becomes a
# manual-recovery fallback.
#
# The generated manifest includes `checkver` + `autoupdate` so Scoop
# users get new versions on `scoop update` even without us pushing a
# new manifest for every release. We still push to bump the canonical
# `version` field so `scoop search` is honest about what's current.
#
# Usage: just release-update-scoop-bucket 0.1.4 ~/qn/scoop-bucket
#
# Precondition: bucket_path is a clean local clone of quicknode/scoop-bucket.
release-update-scoop-bucket version bucket_path:
#!/usr/bin/env bash
set -euo pipefail
if [[ ! -d "{{bucket_path}}/.git" ]]; then
echo "Error: {{bucket_path}} is not a git checkout. Clone quicknode/scoop-bucket there first." >&2
exit 1
fi
if ! git -C "{{bucket_path}}" diff --quiet || ! git -C "{{bucket_path}}" diff --cached --quiet; then
echo "Error: {{bucket_path}} has uncommitted changes. Commit or stash them first." >&2
exit 1
fi
sha_url="https://github.com/quicknode/cli/releases/download/v{{version}}/quicknode-cli-x86_64-pc-windows-msvc.zip.sha256"
if ! sha_line=$(curl -sfL "$sha_url"); then
echo "Error: could not download $sha_url (does the release exist?)" >&2
exit 1
fi
# The .sha256 sidecar is `<hex> *<filename>`; take just the hex.
hash=$(echo "$sha_line" | awk '{print $1}')
if [[ ! "$hash" =~ ^[0-9a-f]{64}$ ]]; then
echo "Error: parsed hash '$hash' is not a 64-char hex string." >&2
exit 1
fi
mkdir -p "{{bucket_path}}/bucket"
cat > "{{bucket_path}}/bucket/qn.json" <<EOF
{
"version": "{{version}}",
"description": "Command-line interface for the Quicknode SDK",
"homepage": "https://github.com/quicknode/cli",
"license": "MIT",
"architecture": {
"64bit": {
"url": "https://github.com/quicknode/cli/releases/download/v{{version}}/quicknode-cli-x86_64-pc-windows-msvc.zip",
"hash": "$hash"
}
},
"bin": "qn.exe",
"checkver": "github",
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/quicknode/cli/releases/download/v\$version/quicknode-cli-x86_64-pc-windows-msvc.zip"
}
}
}
}
EOF
cd "{{bucket_path}}"
if git diff --quiet bucket/qn.json && ! git ls-files --error-unmatch bucket/qn.json >/dev/null 2>&1; then
git add bucket/qn.json
elif git diff --quiet bucket/qn.json; then
echo "bucket/qn.json is already at v{{version}}. Nothing to commit."
exit 0
else
git add bucket/qn.json
fi
git commit -m "qn {{version}}"
echo
echo "Committed qn {{version}} to {{bucket_path}}. To publish:"
echo " git -C {{bucket_path}} push"

# Release Phase 1: bump → branch → PR → merge → tag → GH release → wait for CI.
# Each recipe is callable on its own; release-prepare orchestrates them with prompts.

Expand Down
Loading