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:
Joey Hess 2018-06-26 10:04:42 -04:00
parent c913f39dc8
commit 87b329e451
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 0 additions and 20 deletions

View file

@ -121,8 +121,6 @@ run ts = do
Just "Android" -> writeSysConfig $ androidConfig config
_ -> writeSysConfig config
cleanup
whenM isReleaseBuild $
cabalSetup "git-annex.cabal"
{- Hard codes some settings to cross-compile for Android. -}
androidConfig :: [Config] -> [Config]

View file

@ -51,21 +51,3 @@ getChangelogVersion = do
return $ middle (words verline !! 1)
where
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 ++ ": "