mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-18 17:57:11 +03:00
;Shake changelogs: reduce excessive whitespace
(cherry picked from commit 7b13778a29
)
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."
|
||||
]
|
||||
-- TODO
|
||||
-- changelogs: too many blank lines after final heading
|
||||
-- ,"./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 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)
|
||||
| isNewRelease packageversion = (toTag packageversion, unwords [packageversion, show date])
|
||||
| otherwise = (headrev, headrev)
|
||||
newcontent = "# "++newheading++"\n\n" ++ newitems
|
||||
newchangelog = unlines $ concat [
|
||||
preamble
|
||||
,[newcontent]
|
||||
,if isCommitHash changelogversion then [] else [oldheading]
|
||||
,rest
|
||||
]
|
||||
newcontent = "# "++newheading++"\n" ++ newitems
|
||||
newchangelog =
|
||||
unlines preamble
|
||||
++ newcontent
|
||||
++ (if isCommitHash changelogversion then "" else oldheading)
|
||||
++ unlines rest
|
||||
|
||||
liftIO $ if
|
||||
| lastrev == newrev -> pure () -- putStrLn $ out ++ ": up to date"
|
||||
|
Loading…
Reference in New Issue
Block a user