git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix failure to parse git tag date in psc-publish (#2613)

Fixes one of the problems mentioned in #2610.

commit12c18ae7e146d9006cc72ad8e08595c1943c67d8 authorHarry Garrood <harry@garrood.me> dateTue 31 Jan 2017, 16:59 (10 years ago) parentada063f
1 file changed+3−2
src/Language/PureScript/Publish.hs+3−2
src/Language/PureScript/Publish.hs+3−2
@@ -195,8 +195,9 @@ getVersionFromGitTag = do
195195getTagTime :: Text -> PrepareM UTCTime
196196getTagTime tag = do
197197 out <- readProcess' "git" ["show", T.unpack tag, "--no-patch", "--format=%aI"] ""
198− let time = headMay (lines out) >>= D.parseTime
199− maybe (internalError (CouldntParseGitTagDate tag)) pure time
198+ case mapMaybe D.parseTime (lines out) of
199+ [t] -> pure t
200+ _ -> internalError (CouldntParseGitTagDate tag)
200201
201202getBowerRepositoryInfo :: PackageMeta -> PrepareM (D.GithubUser, D.GithubRepo)
202203getBowerRepositoryInfo = either (userError . BadRepositoryField) return . tryExtract