Something went wrong. Try again.
A collection of +180 reusable WebAssembly modules for building composable CI/CD pipelines with FluentCI fluentci.io/modules
Something went wrong. Try again.
12345678910111213141516171819202122232425262728module CI.ToolSetup (setupWith) where
import Preludeimport CI.Contract as Contractimport CI.Setup.Host as Himport CI.Setup.Types as Typesimport Data.Argonaut.Core (Json)import Data.Either (Either(..), either)import Effect (Effect)import Effect.Exception (throw, try)
foreign import installGit :: Effect Unit
foreign import install :: Json -> Effect Contract.SetupResult
setupWith :: Json -> Effect Contract.SetupResultsetupWith json = do _ <- either throw pure (Types.decodeConfig "glab" json) host <- H.host either throw pure (Types.hostSupported "glab" host) present <- try (H.run [ "git", "--version" ]) case present of Right _ -> pure unit Left _ -> do installGit H.run [ "git", "--version" ] install json