hackage-whatsnew: Check for differences between working directory and hackage

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]

This tool checks to see if the package in a local working directory has changes which are not yet on hackage. This is useful to check if you have forgetton to upload your changes to hackage.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.2, 0.1.1, 0.1.2, 0.1.3
Change log None available
Dependencies base (>=4.6 && <5.0), Cabal (>=1.16 && <2.1), containers (>=0.5 && <0.6), directory (>=1.2 && <1.4), filepath (>=1.3 && <1.5), hackage-db (>=1.22 && <2.1), process (>=1.1 && <1.7), temporary (>=1.2 && <1.3) [details]
License BSD-3-Clause
Author Jeremy Shaw
Maintainer jeremy@n-heptane.com
Category Distribution
Home page https://github.com/stepcut/hackage-whatsnew
Source repo head: git clone https://github.com/stepcut/hackage-whatsnew.git
Uploaded by JeremyShaw at 2018-01-04T16:44:58Z

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for hackage-whatsnew-0.1.0.2

[back to package description]

hackage-whatsnew Hackage Build Status

Do you often modify a package, check that it builds in travis, and then FORGET TO UPLOAD IT!

Then this tool is for you! Its raison d'etre is to see if you have changes in your local directory which are not on hackage.

Usage

hackage-whatsnew depends on the following executables:

  1. cabal

  2. tar

  3. GNU diff (or any diff which supports the -r, -u, and -N options)

These binaries need to be in the current search path. Assuming everything is installed, to use hackage-whatsnew you simply need to:

  1. run cabal update

  2. cd into the same directory as the .cabal file

  3. run hackage-whatsnew

If no changes are detected, then nothing is printed and the exit code is 0.

If changes are detected a recursive diff is displayed and the exit code is 1.

How It Works

This tool works as follows:

  1. read the local .cabal file and figure out the package name

  2. use cabal fetch to get the latest version of the package from hackage

  3. use cabal sdist to generate the .tar.gz for the local working directory

  4. untar both .tar.gz bundles into temporary directories

  5. use diff -ruN to check for differences

  6. exit with 0 if no differences found

  7. exit with 1 if differences with found

  8. exit with 2 if other errors encountered

FAQ

Q: Why is it called hackage-whatsnew instead of hackage-diff?

A: Because hackage-diff was already taken. The whatsnew term is inspired by darcs whatsnew.

Q: Would it by great if the tool did XYZ?

A: Yes! Please submit a pull request.