Skip to content

Commit 4ae512c

Browse files
committed
fix(generate-release-changelog-links): replace turtle with plain IO
turtle ^>= 1.6.x requires optparse-applicative < 0.19, conflicting with the rest of the project. allow-newer would satisfy the solver but turtle 1.6.x fails to compile against 0.19 because of the breaking Doc type change (ansi-wl-pprint -> prettyprinter). Replace turtle usage with standard IO: - Shell monad -> plain list IO with mapM/concat - options/optPath/argPath/argText -> execParser/strOption/argument directly - Pattern URL parser -> Text.breakOn/stripPrefix in Maybe monad - printf/format -> Text concatenation and hPutStrLn stderr - die -> exitFailure helper Also drops foldl and prettyprinter which were only needed via turtle.
1 parent 45f3b0a commit 4ae512c

4 files changed

Lines changed: 230 additions & 520 deletions

File tree

RELEASE.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -211,30 +211,31 @@ The previous release's notes are typically used as a starting template.
211211

212212
## Detailed Changelog Table
213213

214-
The script `scripts/generate-release-changelog-links.hs` generates a table of
215-
changelogs for every package version in a given `cardano-node` build plan. It
216-
takes a cabal-generated `plan.json` and a GitHub API access token.
214+
`generate-release-changelog-links` generates a table of changelogs for every
215+
package version in a given `cardano-node` build plan. It reads `GITHUB_TOKEN`
216+
from the environment (generate one at https://github.com/settings/tokens or
217+
run `gh auth token`).
217218

218-
Nix users can run it directly from the devshell:
219+
Nix devshell users have the binary available directly:
219220

220221
```shellsession
221222
$ nix build .#project.x86_64-linux.plan-nix
222-
$ generate-release-changelog-links -o links.md result-json $GITHUB_API_TOKEN
223+
$ export GITHUB_TOKEN=$(gh auth token)
224+
$ generate-release-changelog-links -o links.md
223225
```
224226

225-
`result-json` is the extra output produced by the `plan-nix` build.
227+
`result/plan.json` is the default plan path. Pass an explicit path as the
228+
first argument to override it.
226229

227-
Non-nix users can still run the cabal script directly, though it will build
228-
its dependencies from scratch (requires `zlib` via your OS package manager):
230+
Non-nix users can build and run via cabal:
229231

230232
```shellsession
231-
$ scripts/generate-release-changelog-links.hs -- -o links.md result-json $GITHUB_API_TOKEN
233+
$ export GITHUB_TOKEN=$(gh auth token)
234+
$ cabal run generate-release-changelog-links -- -o links.md
232235
```
233236

234-
For full usage, including how to generate a GitHub API token:
237+
For full usage:
235238

236239
```shellsession
237240
$ generate-release-changelog-links --help
238-
# or, without nix:
239-
$ scripts/generate-release-changelog-links.hs -- --help
240241
```

scripts/generate-release-changelog-links.hs

Lines changed: 0 additions & 322 deletions
This file was deleted.

0 commit comments

Comments
 (0)