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]

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

Versions0.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 logNone available
Dependenciesbase (>=4.6 && <5.0), Cabal (>=1.16 && <2.1), containers (==0.5.*), directory (>=1.2 && <1.4), filepath (>=1.3 && <1.5), hackage-db (>=1.22 && <2.1), process (>=1.1 && <1.7), temporary (==1.2.*) [details]
LicenseBSD-3-Clause
AuthorJeremy Shaw
Maintainerjeremy@n-heptane.com
CategoryDistribution
Home pagehttps://github.com/stepcut/hackage-whatsnew
Source repositoryhead: git clone https://github.com/stepcut/hackage-whatsnew.git
Executableshackage-whatsnew
UploadedThu Jan 4 16:44:58 UTC 2018 by JeremyShaw

Downloads

Maintainers' corner

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.