doc: contributing: update version number process

[ci skip]
This commit is contained in:
Simon Michael 2019-02-05 07:32:33 -08:00
parent f4e237afd6
commit ea116dcffb

View File

@ -1198,27 +1198,31 @@ Finally, for quick, fine-grained performance measurements when troubleshooting o
## Version numbers ## Version numbers
Some places version numbers appear:
- --version (and sometimes --help) output of all hledger* executables
- web manuals on hledger.org
- download page
- changelogs
- release notes
- release announcements
- hackage/stackage uris
- cabal tarball filenames
- platform-specific packages
Some old version numbering goals: Some old version numbering goals:
1. automation, robustness, simplicity, platform independence 1. automation, robustness, simplicity, platform independence
2. cabal versions must be all-numeric 2. cabal versions must be all-numeric
3. release versions can be concise (without extra .0's) 3. release versions can be concise (without extra .0's)
4. releases should have a corresponding VCS tag 4. releases should have a corresponding VCS tag
5. development builds should have a precise version appearing in --version 5. development builds should have a precise version appearing in --version
6. development builds should generate cabal packages with non-confusing versions 6. development builds should generate cabal packages with non-confusing versions
7. there should be a way to mark builds/releases as alpha or beta 7. there should be a way to mark builds/releases as alpha or beta
8. avoid unnecessary compiling and linking 8. avoid unnecessary compiling and linking
9. minimise VCS noise and syncing issues (commits, unrecorded changes) 9. minimise VCS noise and syncing issues (commits, unrecorded changes)
Current policy: Current version numbering policy:
- We (should) follow <http://haskell.org/haskellwiki/Package_versioning_policy> - We (should) follow <http://haskell.org/haskellwiki/Package_versioning_policy>
@ -1239,37 +1243,39 @@ Current policy:
- Release tags in the VCS are like PKG-VERSION. Eg hledger-1.13, - Release tags in the VCS are like PKG-VERSION. Eg hledger-1.13,
- hledger-ui-1.13.1. - hledger-ui-1.13.1.
hledger version numbers appear in: Current process:
- the project's .version file. This is the source of truth. - In each hledger package directory there's a `.version` file
`make setversion` propagates this version number to: containing its desired version number.
- each package's package.yaml file. Here the package version, a CPP - After changing a `.version` file: run `./Shake setversion` to
VERSION macro, and bounds on other hledger packages (like >= propagate the versions to all other places in the packages where
hledger-lib-VERSION && < hledger-lib-NEXTMAJORVERSION) are they should appear. This is not perfect (see Shake.hs) so review and
declared. `make gencabal` or `stack build [--dry-run]` manually adjust the proposed changes before committing. Those
propagates these to packages' .cabal files. places include (you can also run these rules individually):
- hledger/Hledger/Cli/Version.hs assigns VERSION to a global - `PKG/package.yaml` contains the cabal package version declaration,
constant accessible by other hledger code. bounds on other hledger packages, and a CPP VERSION macro used in
`hledger/Hledger/Cli/Version.hs`. Changes in package.yaml will be
propagated to `PKG/PKG.cabal` on the next stack or Shake build, or
by `make gencabal`.
- the doc/lib.m4 file, where it is assigned to the _version_ m4 macro. - `PKG/defs.m4` contains the _version_ macro used in documentation
Shake propagates this to all documentation generated with m4 source files (*.m4.md).
(*.m4.md files).
- site/js/site.js, which defines hyperlinks corresponding to all - At release time:
- released versions.
- git tags for package releases, as mentioned above - `./Shake PKG/CHANGES.md-finalise` converts the topmost heading, if
it is an interim heading (just a commit hash), to a permanent
heading containing the version and today's date.
- the --version output (and sometimes --help output) of all hledger* - for each package being released, a PKG-VERSION git tag is created.
executables
- hackage tarball filenames
- hackage uris
- At major release time:
- A new snapshot of the reference docs is added to the website, by
`./Shake site/doc/VERSION/.snapshot`, and added to the links in
`site/js/site.js`.
## Sample journals ## Sample journals