Shake changelogs: ignore commits beginning with ;

This commit is contained in:
Simon Michael 2019-08-19 11:44:00 +01:00
parent 5bc1e7746f
commit cc9d7f8ae0

View File

@ -566,6 +566,7 @@ main = do
lastversion = words oldheading !! 1 lastversion = words oldheading !! 1
lastrev | iscommithash lastversion = lastversion lastrev | iscommithash lastversion = lastversion
| otherwise = fromMaybe "hledger" pkg ++ "-" ++ lastversion | otherwise = fromMaybe "hledger" pkg ++ "-" ++ lastversion
excludeboring = "--invert-grep --grep '^;'" -- ignore commits beginning with ;
headrev <- unwords . words . fromStdout <$> headrev <- unwords . words . fromStdout <$>
(cmd Shell gitlog "-1 --pretty=%h -- " gitlogpaths :: Action (Stdout String)) (cmd Shell gitlog "-1 --pretty=%h -- " gitlogpaths :: Action (Stdout String))
@ -574,7 +575,7 @@ main = do
then liftIO $ putStrLn $ out ++ ": up to date" then liftIO $ putStrLn $ out ++ ": up to date"
else do else do
newitems <- fromStdout <$> newitems <- fromStdout <$>
(cmd Shell gitlog changelogGitFormat (lastrev++"..") "--" gitlogpaths (cmd Shell gitlog changelogGitFormat (lastrev++"..") excludeboring "--" gitlogpaths
"|" changelogCleanupCmd :: Action (Stdout String)) "|" changelogCleanupCmd :: Action (Stdout String))
let newcontent = "# "++headrev++"\n\n" ++ newitems let newcontent = "# "++headrev++"\n\n" ++ newitems
newfile = unlines $ concat [ newfile = unlines $ concat [