hledger/RELEASING.md

154 lines
4.7 KiB
Markdown
Raw Normal View History

# Releasing
2021-08-04 09:28:26 +03:00
<div class=pagetoc>
<!-- toc -->
</div>
Guidance for release managers and maintainers.
2021-08-04 04:52:09 +03:00
Some of this might move elsewhere later.
2021-08-04 04:52:09 +03:00
## Terminology
2021-08-04 04:52:09 +03:00
- "main" / "main branch" = `master` branch in the main hledger repo (might get renamed in future)
- "release" / "release branch" = a release branch in the main hledger repo (eg `1.22-branch`)
2021-08-04 04:52:09 +03:00
## Commits
2021-08-04 04:52:09 +03:00
**When committing/reviewing:**
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-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-08-04 04:52:09 +03:00
## Changelogs
2021-07-28 22:22:00 +03:00
2021-08-04 04:52:09 +03:00
Always maintain changelogs in main 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-04 11:37:58 +03:00
- in the main 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
- copy the new sections from main changelogs to release branch changelogs
2021-08-04 04:52:09 +03:00
## Pre release
1. create release branch when needed:\
`git branch MAJORVER-branch BRANCHPOINT`\
2021-08-04 09:52:05 +03:00
Sometimes, we make the major release tag (`1.22`) on master,
and create a release branch (`1.22-branch`) when there's a followup minor release:\
2021-08-04 04:52:09 +03:00
`git branch 1.22-branch 1.22`
1. update changelogs in main
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-01 21:45:52 +03:00
- from: magit, `l o X.Y..master`, `M-x magit-toggle-buffer-lock`, `C-x D`
2021-08-04 04:52:09 +03:00
(`M-x toggle-window-dedicated`)
2021-08-01 21:45:52 +03:00
- to: magit, `l o master..X.Y`, `M-x magit-toggle-buffer-lock`, `C-x D`
- 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-04 11:40:12 +03:00
- update changelogs in main (move corresponding change items under pending release heading)
2021-08-04 04:52:09 +03:00
## Release
- finalise [changelogs](#changelogs) in main,
copy to changelogs in release branch
2021-08-04 11:45:42 +03:00
- `./Shake.hs` to update `Shake` and review release tasks
2021-08-04 04:52:09 +03:00
2021-08-04 11:45:42 +03:00
- `./Shake setversion VER [-c]` (first without `-c` to review, then with `-c` to commit).\
2021-08-04 04:52:09 +03:00
Also `touch hledger/Hledger/Cli/Version.hs` ?
- `./Shake cmdhelp [-c]`
- `./Shake mandates`
- `./Shake manuals [-c]`
- `make tag`
- `make hackageupload`
- push tags: magit `P t`
- push to CI branches to test & generate binaries
- magit `P -f e origin/ci-windows`
- ... `origin/ci-mac`
- ... `origin/ci-linux-static`
- ... `origin/ci-linux-static-arm32`
- in site: update `download.md`
- in site: update `relnotes.md`
- copy template
- add new changelog sections, omitting hledger-lib
- add summary
- add contributors
- update `doc/ANNOUNCE`
- summary/contributors from release notes
- create github release
- tag VER, title VER, body similar to previous release
- at https://ci.hledger.org download each CI branch artifact when ready, to ~/Downloads/hledger-VER/
- drag artifacts into github draft release
- publish release
- announce
- send ANNOUNCE to hledger@googlegroups.com, haskell-cafe@googlegroups.com
- link release notes/summary in #hledger:matrix.org, #hledger:libera.chat
- tweet at https://twitter.com/simonkwmichael
- toot at https://fosstodon.org/web/accounts/106304084994827771
## Post release
- merge/check/update download page changes (docker, homebrew, nix, linux distros..)
- support
- handle issues
2021-07-28 22:22:00 +03:00
2021-08-04 04:52:09 +03:00
- update procedures, tools, docs