git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix failure to parse git tag date in psc-publish (#2613)
12c18aeHarry Garrood
src/Language/PureScript/Publish.hs+3−2
@@ -195,8 +195,9 @@ getVersionFromGitTag = do
195getTagTime :: Text -> PrepareM UTCTime
195getTagTime :: Text -> PrepareM UTCTime
196getTagTime tag = do
196getTagTime tag = do
197 out <- readProcess' "git" ["show", T.unpack tag, "--no-patch", "--format=%aI"] ""
197 out <- readProcess' "git" ["show", T.unpack tag, "--no-patch", "--format=%aI"] ""
198− let time = headMay (lines out) >>= D.parseTime
198+ case mapMaybe D.parseTime (lines out) of
199+ [t] -> pure t
199− maybe (internalError (CouldntParseGitTagDate tag)) pure time
200+ _ -> internalError (CouldntParseGitTagDate tag)
200
201
201getBowerRepositoryInfo :: PackageMeta -> PrepareM (D.GithubUser, D.GithubRepo)
202getBowerRepositoryInfo :: PackageMeta -> PrepareM (D.GithubUser, D.GithubRepo)
202getBowerRepositoryInfo = either (userError . BadRepositoryField) return . tryExtract
203getBowerRepositoryInfo = either (userError . BadRepositoryField) return . tryExtract