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

[ bsd3, distribution, program ] [ Propose Tags ]

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]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.1, 0.1.2, 0.1.3
Dependencies base (>=4.6 && <4.9), Cabal (>=1.16 && <1.23), containers (>=0.5 && <0.6), directory (>=1.2 && <1.3), filepath (>=1.4 && <1.5), hackage-db (>=1.22 && <1.23), process (>=1.2 && <1.5), temporary (>=1.2 && <1.3) [details]
License BSD-3-Clause
Author Jeremy Shaw
Maintainer jeremy@n-heptane.com
Category Distribution
Source repo head: git clone https://github.com/stepcut/hackage-whatsnew.git
Uploaded by JeremyShaw at 2015-12-20T02:07:17Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables hackage-whatsnew
Downloads 3670 total (25 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-11-29 [all 2 reports]

Readme for hackage-whatsnew-0.1.0.0

[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.