Skip to content

Commit 535a55c

Browse files
committed
docs(release): document .deb install and curate release-notes install block (DX-5675)
README install section reordered around one recommended path per platform — Homebrew (macOS/Linux), Scoop (Windows), .deb (Debian/Ubuntu), AUR (Arch), COPR (Fedora/EPEL), Docker (GHCR) — with crates.io / source / prebuilt binaries grouped under an Alternatives subsection. The .deb, COPR, and Docker entries are new; the others are kept verbatim. Adds a `release-update-install-notes` justfile recipe that prepends a curated "How to install" block (rendered from a reviewable template at packaging/release-notes-install.md.tmpl, with {{VERSION}} substitution) to the GitHub release body. cargo-dist's auto-generated install section is preserved below a `---` separator. The block is bracketed by HTML-comment markers so re-runs replace the existing block instead of stacking, making the recipe safe to invoke standalone or as the final step of `release-sync-manual-channels`, which it now is.
1 parent b3daa74 commit 535a55c

4 files changed

Lines changed: 158 additions & 9 deletions

File tree

Justfile

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,55 @@ release-update-scoop-bucket version bucket_path:
264264
echo "Committed qn {{version}} to {{bucket_path}}. To publish:"
265265
echo " git -C {{bucket_path}} push"
266266
267+
# Prepend a curated "How to install" section to the GitHub release body for
268+
# v<VERSION>. The block is rendered from packaging/release-notes-install.md.tmpl
269+
# (substituting {{VERSION}}) and bracketed by HTML-comment markers so re-runs
270+
# replace the existing block instead of stacking duplicates. cargo-dist's
271+
# auto-generated body is preserved below a `---` separator.
272+
#
273+
# Usage:
274+
# just release-update-install-notes 0.1.8 # edits the release
275+
# just release-update-install-notes 0.1.8 --dry-run # prints assembled body to stdout
276+
release-update-install-notes version mode="":
277+
#!/usr/bin/env bash
278+
set -euo pipefail
279+
version="{{version}}"
280+
mode="{{mode}}"
281+
if [[ -n "$mode" && "$mode" != "--dry-run" ]]; then
282+
echo "Error: unknown mode '$mode' (expected --dry-run or unset)." >&2
283+
exit 1
284+
fi
285+
tmpl="packaging/release-notes-install.md.tmpl"
286+
if [[ ! -f "$tmpl" ]]; then
287+
echo "Error: $tmpl not found." >&2
288+
exit 1
289+
fi
290+
rendered=$(sed "s/{{ '{{' }}VERSION{{ '}}' }}/${version}/g" "$tmpl")
291+
start_marker='<!-- qn-install-block:start -->'
292+
end_marker='<!-- qn-install-block:end -->'
293+
# The block itself does not include the `---` separator — the separator lives
294+
# between the block and the rest of the body and stays in the body across re-runs.
295+
block=$(printf '%s\n%s\n%s' "$start_marker" "$rendered" "$end_marker")
296+
current=$(gh release view "v${version}" --json body --jq .body)
297+
if [[ "$current" == *"$start_marker"* && "$current" == *"$end_marker"* ]]; then
298+
# Replace existing block (idempotent re-run). Split body around markers in pure bash.
299+
before="${current%%$start_marker*}"
300+
after_with_end="${current#*$start_marker}"
301+
after="${after_with_end#*$end_marker}"
302+
new_body="${before}${block}${after}"
303+
else
304+
new_body=$(printf '%s\n\n---\n%s' "$block" "$current")
305+
fi
306+
if [[ "$mode" == "--dry-run" ]]; then
307+
printf '%s\n' "$new_body"
308+
exit 0
309+
fi
310+
tmpfile=$(mktemp)
311+
trap 'rm -f "$tmpfile"' EXIT
312+
printf '%s\n' "$new_body" > "$tmpfile"
313+
gh release edit "v${version}" --notes-file "$tmpfile"
314+
echo "Updated release v${version} with curated install block."
315+
267316
# Run release-update-{homebrew-tap,scoop-bucket,aur-bin} in sequence for
268317
# the latest release tag, then print the three `git push` commands the
269318
# maintainer needs to run to publish. Auto-detects the version from the
@@ -307,7 +356,9 @@ release-sync-manual-channels root="~/qn" version="":
307356
echo
308357
just release-update-aur-bin "$version" "${root}/qn-bin"
309358
echo
310-
echo "All three channels updated. To publish, run:"
359+
just release-update-install-notes "$version"
360+
echo
361+
echo "Manual channels and release-notes install block updated. To publish, run:"
311362
echo " git -C ${root}/homebrew-tap push"
312363
echo " git -C ${root}/scoop-bucket push"
313364
echo " git -C ${root}/qn-bin push"

README.md

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,7 @@ error: null
2929

3030
## Installation
3131

32-
### From crates.io
33-
34-
```sh
35-
cargo install quicknode-cli
36-
```
37-
38-
The crate name is `quicknode-cli` but the installed binary is `qn`.
32+
Pick the recommended path for your platform. Other channels are listed under [Alternatives](#alternatives).
3933

4034
### Homebrew (macOS, Linux)
4135

@@ -50,19 +44,60 @@ scoop bucket add quicknode https://github.com/quicknode/scoop-bucket
5044
scoop install quicknode/qn
5145
```
5246

47+
### `.deb` (Debian, Ubuntu)
48+
49+
Each GitHub release attaches `qn_<VERSION>_amd64.deb` and `qn_<VERSION>_arm64.deb`. Check your architecture with `dpkg --print-architecture`, then grab the matching file from the [latest release page](https://github.com/quicknode/cli/releases/latest):
50+
51+
```sh
52+
# replace <VERSION> with the version on the release page, e.g. 0.1.8
53+
curl -LO https://github.com/quicknode/cli/releases/download/v<VERSION>/qn_<VERSION>_amd64.deb
54+
sudo apt install ./qn_<VERSION>_amd64.deb
55+
```
56+
5357
### Arch Linux (AUR)
5458

5559
```sh
5660
yay -S qn-bin # or any other AUR helper
5761
```
5862

59-
### From source
63+
### Fedora, EPEL (COPR)
64+
65+
```sh
66+
sudo dnf copr enable quicknode/qn
67+
sudo dnf install qn
68+
```
69+
70+
### Docker (GHCR)
71+
72+
```sh
73+
docker pull ghcr.io/quicknode/qn:latest
74+
docker run --rm ghcr.io/quicknode/qn:latest --help
75+
```
76+
77+
### Alternatives
78+
79+
<details>
80+
<summary>crates.io, from source, prebuilt binaries</summary>
81+
82+
**crates.io:**
83+
84+
```sh
85+
cargo install quicknode-cli
86+
```
87+
88+
The crate name is `quicknode-cli` but the installed binary is `qn`.
89+
90+
**From source:**
6091

6192
```sh
6293
git clone git@github.com:quicknode/cli.git && cd cli
6394
cargo install --path .
6495
```
6596

97+
**Prebuilt binaries:** every GitHub release attaches per-platform archives — see the [latest release page](https://github.com/quicknode/cli/releases/latest).
98+
99+
</details>
100+
66101
## Authentication
67102

68103
You will need a Quicknode API key to get started. Once you have that, you can run `qn auth login`

RELEASING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@ git -C ~/qn/qn-bin push
7676

7777
The recipe pulls both Linux gnu sha256 sidecars (x86_64 + aarch64) from the release, renders a `PKGBUILD` + `.SRCINFO`, and stages them. Push goes to `ssh://aur@aur.archlinux.org/qn-bin.git` — the AUR's git remote.
7878

79+
### Curated install block on the release notes
80+
81+
`release-sync-manual-channels` finishes by calling `release-update-install-notes`, which prepends a curated "How to install" section to the GitHub release body. Source for the block is `packaging/release-notes-install.md.tmpl`; edit it there if the install copy needs to change. The recipe is idempotent — re-running against the same release replaces the existing block rather than stacking duplicates — so it's safe to invoke standalone:
82+
83+
```fish
84+
just release-update-install-notes X.Y.Z # edits the release in place
85+
just release-update-install-notes X.Y.Z --dry-run # prints the assembled body without editing
86+
```
87+
88+
cargo-dist's auto-generated content is preserved below a `---` separator.
89+
7990
## One-time setup notes
8091

8192
A few channels needed manual setup the first time. Captured here so the next maintainer doesn't have to rediscover them.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## Install
2+
3+
Pick the recommended path for your platform.
4+
5+
### Homebrew (macOS, Linux)
6+
7+
```sh
8+
brew install quicknode/tap/qn
9+
```
10+
11+
### Scoop (Windows)
12+
13+
```powershell
14+
scoop bucket add quicknode https://github.com/quicknode/scoop-bucket
15+
scoop install quicknode/qn
16+
```
17+
18+
### `.deb` (Debian, Ubuntu)
19+
20+
Check your architecture with `dpkg --print-architecture`, then grab the matching `.deb` asset from this release:
21+
22+
```sh
23+
# amd64
24+
curl -LO https://github.com/quicknode/cli/releases/download/v{{VERSION}}/qn_{{VERSION}}_amd64.deb
25+
sudo apt install ./qn_{{VERSION}}_amd64.deb
26+
27+
# arm64
28+
curl -LO https://github.com/quicknode/cli/releases/download/v{{VERSION}}/qn_{{VERSION}}_arm64.deb
29+
sudo apt install ./qn_{{VERSION}}_arm64.deb
30+
```
31+
32+
### Arch Linux (AUR)
33+
34+
```sh
35+
yay -S qn-bin # or any other AUR helper
36+
```
37+
38+
### Fedora, EPEL (COPR)
39+
40+
```sh
41+
sudo dnf copr enable quicknode/qn
42+
sudo dnf install qn
43+
```
44+
45+
### Docker (GHCR)
46+
47+
```sh
48+
docker pull ghcr.io/quicknode/qn:{{VERSION}}
49+
docker run --rm ghcr.io/quicknode/qn:{{VERSION}} --help
50+
```
51+
52+
For `cargo install`, source builds, and raw prebuilt binaries see the [project README](https://github.com/quicknode/cli#alternatives).

0 commit comments

Comments
 (0)