Make Build/BuildVersion update embedded version number
This way, autobuilders can run it before building, in a tree where git-annex was already built, and get the current git rev embedded in the build. Before, the version number only updated when the setup program was run, which was up to cabal and not on every build.
This commit is contained in:
parent
7ecbb6bc20
commit
a1b55056fc
7 changed files with 37 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
|||
{- Checks system configuration and generates SysConfig. -}
|
||||
{- Checks system configuration and generates Build/SysConfig and Build/Version. -}
|
||||
|
||||
{-# OPTIONS_GHC -fno-warn-tabs #-}
|
||||
|
||||
|
@ -12,15 +12,13 @@ import Utility.Env.Basic
|
|||
import qualified Git.Version
|
||||
import Utility.Directory
|
||||
|
||||
import Control.Monad.IfElse
|
||||
import Control.Monad
|
||||
import Control.Applicative
|
||||
import Prelude
|
||||
|
||||
tests :: [TestCase]
|
||||
tests =
|
||||
[ TestCase "version" (Config "packageversion" . StringConfig <$> getVersion)
|
||||
, TestCase "UPGRADE_LOCATION" getUpgradeLocation
|
||||
[ TestCase "UPGRADE_LOCATION" getUpgradeLocation
|
||||
, TestCase "git" $ testCmd "git" "git --version >/dev/null"
|
||||
, TestCase "git version" getGitVersion
|
||||
, testCp "cp_a" "-a"
|
||||
|
@ -120,6 +118,7 @@ run ts = do
|
|||
case v of
|
||||
Just "Android" -> writeSysConfig $ androidConfig config
|
||||
_ -> writeSysConfig config
|
||||
writeVersion =<< getVersion
|
||||
cleanup
|
||||
|
||||
{- Hard codes some settings to cross-compile for Android. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue