;Shake changelogs: reduce excessive whitespace
(cherry picked from commit 7b13778a29f4e4959077ccaa1186ebe57454ff22)
This commit is contained in:
parent
f2d2272737
commit
81b07dd6f5
14
Shake.hs
14
Shake.hs
@ -90,7 +90,6 @@ usage =
|
|||||||
,"Add -B, with nothing immediately after it, to force rebuilding."
|
,"Add -B, with nothing immediately after it, to force rebuilding."
|
||||||
]
|
]
|
||||||
-- TODO
|
-- TODO
|
||||||
-- changelogs: too many blank lines after final heading
|
|
||||||
-- ,"./Shake releasebranch create a new release branch, bump master to next dev version (.99)"
|
-- ,"./Shake releasebranch create a new release branch, bump master to next dev version (.99)"
|
||||||
-- ,"./Shake majorversion bump to the next major version project-wide, update affected files"
|
-- ,"./Shake majorversion bump to the next major version project-wide, update affected files"
|
||||||
-- ,"./Shake minorversion PKGS bump one or more packages to their next minor version project-wide, update affected files"
|
-- ,"./Shake minorversion PKGS bump one or more packages to their next minor version project-wide, update affected files"
|
||||||
@ -665,13 +664,12 @@ main = do
|
|||||||
(newrev, newheading)
|
(newrev, newheading)
|
||||||
| isNewRelease packageversion = (toTag packageversion, unwords [packageversion, show date])
|
| isNewRelease packageversion = (toTag packageversion, unwords [packageversion, show date])
|
||||||
| otherwise = (headrev, headrev)
|
| otherwise = (headrev, headrev)
|
||||||
newcontent = "# "++newheading++"\n\n" ++ newitems
|
newcontent = "# "++newheading++"\n" ++ newitems
|
||||||
newchangelog = unlines $ concat [
|
newchangelog =
|
||||||
preamble
|
unlines preamble
|
||||||
,[newcontent]
|
++ newcontent
|
||||||
,if isCommitHash changelogversion then [] else [oldheading]
|
++ (if isCommitHash changelogversion then "" else oldheading)
|
||||||
,rest
|
++ unlines rest
|
||||||
]
|
|
||||||
|
|
||||||
liftIO $ if
|
liftIO $ if
|
||||||
| lastrev == newrev -> pure () -- putStrLn $ out ++ ": up to date"
|
| lastrev == newrev -> pure () -- putStrLn $ out ++ ": up to date"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user