Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion doc/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
41 changes: 41 additions & 0 deletions scripts/update-help.awk
Original file line number Diff line number Diff line change
@@ -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