;tools: Shake changelogs: fix missing blank lines around old heading
This commit is contained in:
parent
aa0f4a74c9
commit
455db07495
4
Shake.hs
4
Shake.hs
@ -747,14 +747,16 @@ main = do
|
|||||||
:: Action (Stdout String))
|
:: Action (Stdout String))
|
||||||
|
|
||||||
-- Add the new heading and change items to the changelog, or print them.
|
-- Add the new heading and change items to the changelog, or print them.
|
||||||
let newcontent = "# " ++ latestrev ++ "\n" ++ newitems
|
let newcontent = "# " ++ latestrev ++ "\n\n" ++ newitems ++ "\n"
|
||||||
liftIO $ if dryrun
|
liftIO $ if dryrun
|
||||||
then putStr $ out ++ ":\n" ++ newcontent
|
then putStr $ out ++ ":\n" ++ newcontent
|
||||||
else do
|
else do
|
||||||
writeFile out $ concat [
|
writeFile out $ concat [
|
||||||
unlines preamble
|
unlines preamble
|
||||||
,newcontent
|
,newcontent
|
||||||
|
,"\n"
|
||||||
,if isCommitHash oldversion then "" else oldheading
|
,if isCommitHash oldversion then "" else oldheading
|
||||||
|
,"\n"
|
||||||
,unlines rest
|
,unlines rest
|
||||||
]
|
]
|
||||||
putStrLn (out ++ ": updated to " ++ latestrev)
|
putStrLn (out ++ ": updated to " ++ latestrev)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user