remove code to update version in cabal file
I have not used this when making releases for a long time.
This commit is contained in:
parent
c913f39dc8
commit
87b329e451
2 changed files with 0 additions and 20 deletions
|
@ -121,8 +121,6 @@ run ts = do
|
||||||
Just "Android" -> writeSysConfig $ androidConfig config
|
Just "Android" -> writeSysConfig $ androidConfig config
|
||||||
_ -> writeSysConfig config
|
_ -> writeSysConfig config
|
||||||
cleanup
|
cleanup
|
||||||
whenM isReleaseBuild $
|
|
||||||
cabalSetup "git-annex.cabal"
|
|
||||||
|
|
||||||
{- Hard codes some settings to cross-compile for Android. -}
|
{- Hard codes some settings to cross-compile for Android. -}
|
||||||
androidConfig :: [Config] -> [Config]
|
androidConfig :: [Config] -> [Config]
|
||||||
|
|
|
@ -51,21 +51,3 @@ getChangelogVersion = do
|
||||||
return $ middle (words verline !! 1)
|
return $ middle (words verline !! 1)
|
||||||
where
|
where
|
||||||
middle = drop 1 . init
|
middle = drop 1 . init
|
||||||
|
|
||||||
{- Set up cabal file with version. -}
|
|
||||||
cabalSetup :: FilePath -> IO ()
|
|
||||||
cabalSetup cabalfile = do
|
|
||||||
version <- takeWhile (\c -> isDigit c || c == '.')
|
|
||||||
<$> getChangelogVersion
|
|
||||||
cabal <- readFile cabalfile
|
|
||||||
writeFile tmpcabalfile $ unlines $
|
|
||||||
map (setfield "Version" version) $
|
|
||||||
lines cabal
|
|
||||||
renameFile tmpcabalfile cabalfile
|
|
||||||
where
|
|
||||||
tmpcabalfile = cabalfile++".tmp"
|
|
||||||
setfield field value s
|
|
||||||
| fullfield `isPrefixOf` s = fullfield ++ value
|
|
||||||
| otherwise = s
|
|
||||||
where
|
|
||||||
fullfield = field ++ ": "
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue