Open
Description
It'd be nice if cabal build
could automatically add the revision number for the appropriate SCM to the versionTags
field of Paths_$pkgid.version
. I envision the following usage scenario:
$ cabal configure --revision-number # or --build-id, or whatever
$ cabal run -- --version
1.0-0a4f3c6g
$ cabal configure
$ cabal run -- --version
1.0
For extracting the revision number from a working copy there is the vcs-revision package on Hackage (only SVN, Git and Mercurial support ATM).