use unshorted hash in version

short hashes can be lengthened by unrelated pulls into a repo, breaking
reproducible builds
https://lists.reproducible-builds.org/pipermail/rb-general/2023-September/003072.html
This commit is contained in:
Joey Hess 2023-09-20 09:31:59 -04:00
parent dcb0491a95
commit 784be819b3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -36,7 +36,7 @@ getVersion = do
, catchDefaultIO changelogversion $ do
gitversion <- takeWhile (\c -> isAlphaNum c) <$> readProcess "sh"
[ "-c"
, "git log -n 1 --format=format:'%h'"
, "git log -n 1 --format=format:'%H'"
] ""
return $ if null gitversion
then changelogversion