Module documentation for 0.2.4
There are no documented modules for this package.
hkgr (pronounced “hackager”) is a tool for making releases of
Haskell packages on Hackage.
$ hkgr Hackage Release tool Usage: hkgr [--version] COMMAND 'Hackager' is a tool for easy Hackage package release workflow Available options: -h,--help Show this help text --version Show version Available commands: tagdist 'git tag' version and 'cabal sdist' tarball upload 'cabal upload' candidate tarball to Hackage publish Publish to Hackage ('cabal upload --publish') upload-haddock Upload candidate documentation to Hackage publish-haddock Publish documentation to Hackage version Show the package version from .cabal file
You are preparing for a release…
So you commit changes to your package and push them to check CI results:
$ git commit -m "new release" $ git push
Now you want to make a dist tarball, which is done from a git tag:
$ hkgr tagdist
tagdist command first reads the current package version
.cabal file in the current directory), and uses that to
It then runs
cabal sdist from a temporary pristine checkout of the tag
to generate the dist tarball.
If the tag already exists (eg if you already ran
and you need to add commits to the release
you can use
--force to move the tag to the latest commit
and generate a new tarball off that,
tagdist refuses to run again to prevent accidently overwriting
the tag and dist tarball.
One should not be able to
tagdist on an already published
(ie released) version.
(If sdist fails for some reason then hkgr tries to reset the tag.)
If all is good, it’s time for a candidate release:
$ hkgr upload
This uploads a candidate dist tarball to Hackage: this can be repeated.
Haddock draft documentation can also be uploaded if desired:
$ hkgr upload-haddock
Once you are happy, you can release to Hackage:
$ hkgr publish
If it succeeds then hkgr creates a “published lockfile” in
and the git tag is pushed to origin.
(Then hkgr will refuse to do further commands on the released version.)
Optionally one can publish haddock docs:
$ hkgr publish-haddock
git, and also
hlint if available.
- git push before publishing
- only push up to tag
- push git tag
- hlint is now a warning not an error
- prefix version tags with v
- surround git diff output with quote lines
- catch exception for sdist
- run hlint before git tag
- relax force sdist when no existing tarball
- show git diff to warn project dirty
- fix creation of published symlink lockfile
- tagdist before
cabal uploadif no tarball
- merge tag and dist commands into tagdist
- if sdist fails then reset tag
- drop push-tags command
- add published lock file: prevents tagging/dist/upload after publish
- tag before sdist if no tag
- push tag after publishing
- Initially created.