don't use changelog version in commit message
authorJoey Hess <joeyh@joeyh.name>
Mon, 9 Aug 2021 16:31:48 +0000 (12:31 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 9 Aug 2021 16:31:48 +0000 (12:31 -0400)
changelog may have a new unreleased version open already

Build/DistributionUpdate.hs
doc/bugs/downloads.kitenet.net_do_not_correspond_in_version/comment_2_1ccfafa13e1807f099b22bb69d23497c._comment [new file with mode: 0644]

index 685366f449bb4853dae93b56ec929027c41699b5..4cddf1004caf30f40a5969fe31fc2858ba89eddc 100644 (file)
@@ -117,14 +117,14 @@ getbuild repodir (url, f) = do
        versionchar c = isAlphaNum c || c == '.' || c == '-'
 
 makeinfos :: [(FilePath, Version)] -> Version -> Annex [([Char], Maybe GitAnnexDistribution)]
-makeinfos updated version = do
+makeinfos updated changelogversion = do
        mapM_ (\f -> inRepo $ runBool [Param "annex", Param "add", File f]) (map fst updated)
        void $ inRepo $ runBool 
                [ Param "commit"
                , Param "-a"
                , Param ("-S" ++ signingKey)
                , Param "-m"
-               , Param $ "publishing git-annex " ++ version
+               , Param $ "publishing git-annex " ++ descversion
                ]
        now <- liftIO getCurrentTime
        liftIO $ putStrLn $ "building info files"
@@ -150,7 +150,7 @@ makeinfos updated version = do
                [ Param "commit"
                , Param ("-S" ++ signingKey)
                , Param "-m"
-               , Param $ "updated info files for git-annex " ++ version
+               , Param $ "updated info files for git-annex " ++ descversion
                ]
        void $ inRepo $ runBool
                [ Param "annex"
@@ -174,7 +174,8 @@ makeinfos updated version = do
   where
        outofdate (_, md) = case md of
                Nothing -> True
-               Just d -> distributionVersion d /= version
+               Just d -> distributionVersion d /= changelogversion
+       descversion = unwords (nub (map snd updated))
 
 getRepoDir :: IO FilePath
 getRepoDir = do
diff --git a/doc/bugs/downloads.kitenet.net_do_not_correspond_in_version/comment_2_1ccfafa13e1807f099b22bb69d23497c._comment b/doc/bugs/downloads.kitenet.net_do_not_correspond_in_version/comment_2_1ccfafa13e1807f099b22bb69d23497c._comment
new file mode 100644 (file)
index 0000000..16505d5
--- /dev/null
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2021-08-09T16:23:35Z"
+ content="""
+As far as the git commit message goes, I usually don't have a new changelog
+entry for an unreleased version opened when I run the release updating
+script, but did in this case. Only the commit message is affected. I've
+fixed the cause of that problem.
+"""]]