From b645c4d57eee25fe55e9c21b29f342c56b8f3120 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 24 Apr 2021 21:51:43 +0200 Subject: [PATCH] Add date to GHC bindist names created by ghcup --- lib/GHCup.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/GHCup.hs b/lib/GHCup.hs index 7d47aa2..df61f08 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -61,6 +61,8 @@ import Data.List import Data.Maybe import Data.String.Interpolate import Data.Text ( Text ) +import Data.Time.Clock +import Data.Time.Format.ISO8601 import Data.Versions import Data.Word8 import GHC.IO.Exception @@ -1244,9 +1246,10 @@ Stage1Only = YES|] . B16.encode . SHA256.hashlazy $ c + cTime <- liftIO getCurrentTime tarName <- parseRel - [i|ghc-#{tVerToText tver}-#{pfReqToString pfreq}-#{cDigest}.tar#{takeExtension (toFilePath tar)}|] + [i|ghc-#{tVerToText tver}-#{pfReqToString pfreq}-#{iso8601Show cTime}-#{cDigest}.tar#{takeExtension (toFilePath tar)}|] let tarPath = cacheDir tarName handleIO (throwE . CopyError . show) $ liftIO $ copyFile (workdir tar) tarPath