2021-07-14 07:41:17 +03:00
|
|
|
# Releasing
|
|
|
|
|
2021-08-04 09:28:26 +03:00
|
|
|
<div class=pagetoc>
|
|
|
|
<!-- toc -->
|
|
|
|
</div>
|
|
|
|
|
2021-07-14 07:41:17 +03:00
|
|
|
Guidance for release managers and maintainers.
|
2021-08-04 04:52:09 +03:00
|
|
|
Some of this might move elsewhere later.
|
2021-07-14 07:41:17 +03:00
|
|
|
|
2021-08-04 04:52:09 +03:00
|
|
|
## Terminology
|
2021-07-14 07:41:17 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
- **OLD** - previous release version, eg `1.22` or `1.22.1`
|
|
|
|
- **NEW** - new release version, eg `1.22.2` or `1.23`
|
|
|
|
- **MAJORVER** - just the major version part, eg `1.22` or `1.23`
|
|
|
|
- **master** / **master branch** - `master` branch in the main hledger repo
|
|
|
|
- **release** / **release branch** - a release branch in the main hledger repo, named MAJORVER-branch, eg `1.22-branch`
|
|
|
|
- **site** / **site repo** - master branch in the hledger_website repo, usually cloned under the main repo as `site`
|
2021-07-14 07:41:17 +03:00
|
|
|
|
2021-08-04 04:52:09 +03:00
|
|
|
## Commits
|
2021-07-14 07:41:17 +03:00
|
|
|
|
2021-08-04 04:52:09 +03:00
|
|
|
**When committing/reviewing:**
|
2021-07-14 07:41:17 +03:00
|
|
|
|
2021-08-04 04:52:09 +03:00
|
|
|
Follow our [commit conventions](CONTRIBUTING.html#commit-messages):
|
|
|
|
- in the summary, use a `feat:`/`imp:`/`fix:` prefix (required for user-visible changes),
|
|
|
|
and/or topic prefixes (`bal:`/`areg:`/`test:`/`doc:`/`lib:`/...)
|
|
|
|
- add a leading `;` to skip wasteful CI builds
|
|
|
|
- add a `!` to indicate breaking/incompatible changes
|
|
|
|
- mention any relevant #issue numbers, usually parenthesised at the end
|
|
|
|
- write the summary and at least the first part of the body, if any,
|
|
|
|
as clear change documentation for the intended audience
|
|
|
|
(users/installers/packagers/developers)
|
2021-07-14 07:41:17 +03:00
|
|
|
|
2021-08-04 04:52:09 +03:00
|
|
|
**When committing/pushing/merging:**
|
2021-08-04 11:23:22 +03:00
|
|
|
- run `bin/commitlint` before push, to check recent commits
|
2021-08-04 04:52:09 +03:00
|
|
|
- or, run it automatically before each commit (`make installcommithook` to configure your local repo)
|
|
|
|
- it also runs in CI on github for pull requests, etc.
|
2021-07-14 07:41:17 +03:00
|
|
|
|
2021-08-04 04:52:09 +03:00
|
|
|
## Changelogs
|
2021-07-28 22:22:00 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
Always maintain changelogs in master branch (not in release branches).
|
2021-07-28 22:22:00 +03:00
|
|
|
|
2021-08-04 04:52:09 +03:00
|
|
|
**Frequently**, especially after merging changes, and before cherry picking into release branch:
|
|
|
|
|
|
|
|
- dry run: `./Shake changelogs -n`
|
|
|
|
- add new changes: `./Shake changelogs`
|
|
|
|
- edit
|
|
|
|
- drop things
|
|
|
|
- move things
|
|
|
|
- Add headings: Features, Improved, Fixes
|
|
|
|
- rewrite things
|
|
|
|
- format ([#ISSUE](https://github.com/simonmichael/hledger/issues/), AUTHOR) on its own line
|
|
|
|
- commit: `./Shake changelogs -c`
|
|
|
|
|
2021-08-04 11:37:09 +03:00
|
|
|
**After cherry-picking** changes to a release branch:
|
2021-08-08 02:07:24 +03:00
|
|
|
- in the master branch changelogs, move the corresponding changelog items under a pending release heading,
|
2021-08-04 11:37:09 +03:00
|
|
|
creating that when necessary:
|
2021-08-04 11:26:26 +03:00
|
|
|
```
|
|
|
|
# LATESTHASH
|
|
|
|
|
2021-08-04 11:37:09 +03:00
|
|
|
...CHANGES ONLY IN MASTER...
|
|
|
|
|
|
|
|
# NEXTVER unreleased
|
2021-08-04 11:26:26 +03:00
|
|
|
|
2021-08-04 11:37:09 +03:00
|
|
|
...CHANGES CHERRYPICKED INTO RELEASE BRANCH...
|
2021-08-04 11:26:26 +03:00
|
|
|
|
|
|
|
# LASTVER YYYY-MM-DD
|
|
|
|
```
|
|
|
|
|
2021-08-04 04:52:09 +03:00
|
|
|
**At release:**
|
|
|
|
|
|
|
|
- do final update/edits; check organisation, wording, formatting, issue links
|
2021-08-04 11:40:12 +03:00
|
|
|
- replace "unreleased" with the release date
|
2021-08-08 02:07:24 +03:00
|
|
|
- copy the new sections from master changelogs to release branch changelogs
|
2021-08-04 04:52:09 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
## Release prep
|
2021-08-04 04:52:09 +03:00
|
|
|
|
|
|
|
1. create release branch when needed:\
|
|
|
|
`git branch MAJORVER-branch BRANCHPOINT`\
|
2021-08-08 02:07:24 +03:00
|
|
|
Sometimes when convenient we make major releases on master (adapt the steps below as needed).
|
|
|
|
And make the release branch later, when a minor release becomes necessary, eg:\
|
2021-08-04 04:52:09 +03:00
|
|
|
`git branch 1.22-branch 1.22`
|
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
1. update changelogs in master
|
2021-08-04 04:52:09 +03:00
|
|
|
|
|
|
|
1. review changes so far, estimate which packages will be released
|
|
|
|
|
2021-07-28 22:22:00 +03:00
|
|
|
1. cherry pick changes to release
|
2021-08-04 09:52:05 +03:00
|
|
|
- cherry pick release-worthy commits
|
2021-08-07 22:15:15 +03:00
|
|
|
- from: magit, `l o MAJORVER-branch..master`, `M-x magit-toggle-buffer-lock`, `M-x toggle-window-dedicated` (`C-c D`)
|
|
|
|
- to: magit, `l o master..MAJORVER-branch`, `M-x magit-toggle-buffer-lock`, `M-x toggle-window-dedicated`
|
2021-08-01 21:45:52 +03:00
|
|
|
- ignore commits already seen in previous cherry picking sessions
|
2021-08-04 04:52:09 +03:00
|
|
|
- ignore changelog commits / other boring commits
|
|
|
|
("dev: doc: update changelogs")
|
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
- update changelogs in master (move corresponding change items under pending release heading)
|
2021-08-04 04:52:09 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
## Release day
|
|
|
|
|
|
|
|
In master:
|
|
|
|
|
|
|
|
- `./Shake.hs` to ensure `Shake` is current, review commands
|
2021-08-04 04:52:09 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
- finalise [changelogs](#changelogs), copy each new section (emacs `C-x r s a` ... `b` ... `c` ... `d`)
|
2021-08-04 04:52:09 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
In release branch:
|
2021-08-04 04:52:09 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
- paste new sections into changelogs
|
|
|
|
|
|
|
|
- `./Shake setversion NEWVER [-c]` (first without `-c` to review, then with `-c` to commit).
|
|
|
|
<!-- Also `touch hledger/Hledger/Cli/Version.hs` ? -->
|
2021-08-04 04:52:09 +03:00
|
|
|
|
|
|
|
- `./Shake cmdhelp [-c]`
|
|
|
|
|
|
|
|
- `./Shake mandates`
|
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
- `./Shake manuals -B [-c]` (using up to date doctool versions)
|
2021-08-04 04:52:09 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
- `make tag` (signed annotated tags for each package and the overall release)
|
2021-08-04 04:52:09 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
- `stack clean && stack install && hledger --version && hledger-ui --version && hledger-web --version`
|
|
|
|
to build locally and check version strings
|
2021-08-04 04:52:09 +03:00
|
|
|
|
|
|
|
- push to CI branches to test & generate binaries
|
|
|
|
- magit `P -f e origin/ci-windows`
|
2021-08-08 02:07:24 +03:00
|
|
|
- magit `P -f e origin/ci-mac`
|
|
|
|
- magit `P -f e origin/ci-linux-static`
|
|
|
|
- magit `P -f e origin/ci-linux-static-arm32` if needed
|
|
|
|
|
|
|
|
In site repo:
|
|
|
|
|
|
|
|
- update `download.md`
|
|
|
|
- outputs in --version examples (search: hledger --version)
|
|
|
|
- final output line from `hledger test` (run in terminal for normal speed)
|
2021-08-08 02:42:53 +03:00
|
|
|
- Total count from `make functest`
|
2021-08-08 02:07:24 +03:00
|
|
|
- query-replace OLD -> NEW in
|
|
|
|
- "current hledger release"
|
|
|
|
- CI binaries badges/links, including linux-static-arm32v7 if built
|
|
|
|
- "building from source"
|
|
|
|
- stack install command
|
|
|
|
- cabal install command
|
|
|
|
- query-replace OLD-brightgreen -> OLD-red
|
|
|
|
- commit: `download: NEW`
|
|
|
|
|
|
|
|
- update `relnotes.md`
|
|
|
|
- copy template, uncomment
|
|
|
|
- replace date
|
|
|
|
- replace XX with NEW
|
|
|
|
- add new changelog sections, excluding hledger-lib
|
|
|
|
- remove any empty sections
|
|
|
|
- add contributors, `git shortlog -sn OLD..NEW`
|
|
|
|
- add summary (major release) or remove it (minor release)
|
|
|
|
- check preview in vs code
|
|
|
|
- commit: `relnotes: NEW`
|
|
|
|
|
|
|
|
In release branch:
|
|
|
|
|
|
|
|
- update `doc/ANNOUNCE` (major release)
|
|
|
|
- summary, contributors from release notes
|
|
|
|
- any other edits
|
|
|
|
- commit: `;doc: ANNOUNCE`
|
|
|
|
|
|
|
|
In master:
|
|
|
|
|
|
|
|
- cherry pick useful release branch changes
|
|
|
|
- `;doc: ANNOUNCE`
|
|
|
|
|
2021-08-08 20:48:20 +03:00
|
|
|
- update `hledger-install/hledger-install.sh`
|
|
|
|
- HLEDGER_INSTALL_VERSION
|
|
|
|
- RESOLVER
|
|
|
|
- HLEDGER_*_VERSION
|
|
|
|
- EXTRA_DEPS
|
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
- wait for CI binaries, https://ci.hledger.org
|
|
|
|
|
|
|
|
- pre-release pause: take a break away from keyboard
|
|
|
|
|
|
|
|
## Release
|
2021-08-04 04:52:09 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
In release branch:
|
2021-08-04 04:52:09 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
- review status, reflect
|
|
|
|
|
|
|
|
- `make hackageupload`
|
2021-08-04 04:52:09 +03:00
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
- push tags: magit `P t origin`
|
2021-08-04 04:52:09 +03:00
|
|
|
|
|
|
|
- create github release
|
2021-08-08 02:07:24 +03:00
|
|
|
- https://github.com/simonmichael/hledger/releases, copy last release's body
|
|
|
|
- create new release from NEW tag if CI workflow has failed
|
|
|
|
- tag NEW, title NEW, body similar to previous release
|
|
|
|
- at https://ci.hledger.org download CI binary artifacts, check sizes look similar to previous
|
|
|
|
- select downloaded artifacts in Finder, drag into github release
|
2021-08-04 04:52:09 +03:00
|
|
|
- publish release
|
|
|
|
|
|
|
|
- announce
|
2021-08-08 20:48:20 +03:00
|
|
|
- push site download/relnotes updates
|
|
|
|
- push master hledger-install update
|
2021-08-08 02:07:24 +03:00
|
|
|
- share release notes link, summary in #hledger:libera.chat
|
|
|
|
- share release notes link, summary, release notes markdown in #hledger:matrix.org
|
|
|
|
- send ANNOUNCE to hledger@googlegroups.com, haskell-cafe@googlegroups.com (major release)
|
|
|
|
or brief announcement to hledger@googlegroups.com (minor release)
|
|
|
|
- ANN: hledger NEW
|
|
|
|
- release notes link, summary
|
|
|
|
- release notes html (copied from browser)
|
|
|
|
- tweet at https://twitter.com/simonkwmichael ?
|
|
|
|
- toot at https://fosstodon.org/web/accounts/106304084994827771 ?
|
2021-08-04 04:52:09 +03:00
|
|
|
|
|
|
|
## Post release
|
|
|
|
|
2021-08-08 02:07:24 +03:00
|
|
|
- merge/check/update download page changes
|
|
|
|
- docker - expect/merge PR
|
|
|
|
- homebrew - expect badge to update soon
|
|
|
|
- nix - expect `make nix-hledger-version` to update after a few days, find and update to that commit hash
|
|
|
|
- linux distros - once in a while, follow the links & search for newer versions, update
|
2021-08-04 04:52:09 +03:00
|
|
|
|
|
|
|
- support
|
|
|
|
|
|
|
|
- handle issues
|
2021-07-28 22:22:00 +03:00
|
|
|
|
2021-08-04 04:52:09 +03:00
|
|
|
- update procedures, tools, docs
|