diff --git a/doc/release-checklist.md b/doc/release-checklist.md index 0a20802a7..5edc664aa 100644 --- a/doc/release-checklist.md +++ b/doc/release-checklist.md @@ -5,6 +5,9 @@ necessary changes for the upcoming release. ## Version bump +This section can be done by running `scripts/version-bump.sh` with the new version +as an argument. + - [ ] Create a new branch for the required changes for this release. - [ ] Update version in `Cargo.toml`. Run `cargo build` to update `Cargo.lock`. Make sure to `git add` the `Cargo.lock` changes as well. @@ -21,7 +24,7 @@ necessary changes for the upcoming release. new version). - [ ] Review `-h`, `--help`, and the `man` page. - [ ] Run `fd -h` and copy the output to the *"Command-line options"* section in - the README + the README. This can be done by running `gawk -i inplace -f scripts/update-help.awk README.md`. - [ ] Push all changes and wait for CI to succeed (before continuing with the next section). - [ ] Optional: manually test the new features and command-line options described diff --git a/scripts/update-help.awk b/scripts/update-help.awk new file mode 100755 index 000000000..269317d82 --- /dev/null +++ b/scripts/update-help.awk @@ -0,0 +1,41 @@ +#!/usr/bin/gawk -f + +BEGIN { + inSection = 0 + inBlock = 0 +} + + +/Command-line options/ { inSection=1 } + +inSection && /^```/ { + inBlock=1 + inSection=0 + # print the starting fence then move to next line + print + next +} + +inBlock && /^```/ { + cmd="cargo run --release --quiet -- -h" + # Output the results of fd -h + u=0 + while (cmd | getline line) { + # Skip everything before the usage line + if (line ~ /^Usage/) { + u=1; + } + if (u) { + print line + } + } + status = close(cmd) + if (status) { + print "failed to generate help output" > "/dev/stderr" + exit 1 + } + inBlock = 0 +} + +!inBlock +