hkgr: Simple Hackage release workflow for package maintainers

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Hkgr (pronouced Hackager) is a tool to help make new releases of Haskell packages, with commands for git tagging, pristine sdist, and uploading to Hackage.


[Skip to Readme]

Properties

Versions 0.0, 0.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.3.1, 0.2.3.2, 0.2.3.3, 0.2.4, 0.2.4, 0.2.4.1, 0.2.5, 0.2.5.1, 0.2.5.2, 0.2.6, 0.2.6.1, 0.2.7, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.3.1, 0.4.3.2, 0.4.4, 0.4.5, 0.4.6
Change log CHANGELOG.md
Dependencies base (<5), directory (>=1.3.1.0), filepath, semigroups, simple-cabal, simple-cmd (>=0.2.0), simple-cmd-args [details]
License GPL-3.0-only
Copyright 2019 Jens Petersen
Author Jens Petersen
Maintainer juhpetersen@gmail.com
Category Util
Home page https://github.com/juhp/hkgr
Bug tracker https://github.com/juhp/hkgr/issues
Source repo head: git clone https://github.com/juhp/hkgr.git
Uploaded by JensPetersen at 2019-10-05T02:03:42Z

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for hkgr-0.2.4

[back to package description]

Hkgr

Hackage GPL-3 license Build status

hkgr (pronounced "hackager") is a tool for making releases of Haskell packages on Hackage.

Usage

$ 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

Explanation

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

tagdist

Now you want to make a dist tarball, which is done from a git tag:

$ hkgr tagdist

The tagdist command first reads the current package version (from the .cabal file in the current directory), and uses that to git tag. 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 tagdist earlier), 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, otherwise 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.)

upload

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

publish

Once you are happy, you can release to Hackage:

$ hkgr publish

If it succeeds then hkgr creates a "published lockfile" in dist/, 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

Requirements

hkgr uses cabal-install, git, and also hlint if available.