reuse Build.Version to generate version

This commit is contained in:
Joey Hess 2015-04-20 15:56:28 -04:00
parent 463bdd9e22
commit e651b29e90
2 changed files with 4 additions and 1 deletions

View file

@ -67,3 +67,6 @@ cabalSetup cabalfile = do
| otherwise = s
where
fullfield = field ++ ": "
main :: IO ()
main = putStr =<< getVersion

View file

@ -9,7 +9,7 @@ umask 022
# This is the same method that the configure script uses when git-annex is
# built from git master.
ANNEX_VERSION=$(git log -n 1 --format=format:'%ci %h'| sed -e 's/-//g' -e 's/ .* /-g/')
ANNEX_VERSION=$(runghc Build/Version.hs)
ANNEX_NDVERSION=$( echo ${ANNEX_VERSION} | sed -e 's,-,+git,' -e 's,$,-1~ndall+1,')