Skip to content

Commit

Permalink
foo
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed Apr 8, 2024
1 parent 93577e7 commit 8b5da14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/HaskellCI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ main = do
CommandDumpConfig -> do
putStr $ unlines $ runDG configGrammar

CommandDiffConfig _Nothing __Nothing -> do
CommandDiffConfig -> do
let oldConfig = emptyConfig -- default
newConfig' <- findConfigFile (optConfig opts)
let newConfig = optConfigMorphism opts newConfig'
Expand Down
8 changes: 3 additions & 5 deletions src/HaskellCI/Cli.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data Command
| CommandRegenerate
| CommandListGHC
| CommandDumpConfig
| CommandDiffConfig (Maybe FilePath) (Maybe FilePath)
| CommandDiffConfig
| CommandVersionInfo
deriving Show

Expand Down Expand Up @@ -136,7 +136,7 @@ cliParserInfo = O.info ((,) <$> cmdP <*> optionsP O.<**> versionP O.<**> O.helpe
, O.command "github" $ O.info githubP $ O.progDesc "Generate GitHub Actions config"
, O.command "list-ghc" $ O.info (pure CommandListGHC) $ O.progDesc "List known GHC versions"
, O.command "dump-config" $ O.info (pure CommandDumpConfig) $ O.progDesc "Dump cabal.haskell-ci config with default values"
, O.command "diff-config" $ O.info diffP $ O.progDesc "Diff between configuration files"
, O.command "diff-config" $ O.info diffP $ O.progDesc "Diff between default and current configuration"
, O.command "version-info" $ O.info (pure CommandVersionInfo) $ O.progDesc "Print versions info haskell-ci was compiled with"
]) <|> travisP

Expand All @@ -149,9 +149,7 @@ cliParserInfo = O.info ((,) <$> cmdP <*> optionsP O.<**> versionP O.<**> O.helpe
githubP = CommandGitHub
<$> O.strArgument (O.metavar "CABAL.FILE" <> O.action "file" <> O.help "Either <pkg.cabal> or cabal.project")

diffP = CommandDiffConfig
<$> O.optional (O.strArgument (O.metavar "FILE" <> O.action "file" <> O.help "Either a generated CI file or Haskell-CI config file."))
<*> O.optional (O.strArgument (O.metavar "FILE" <> O.action "file" <> O.help "Either a generated CI file or Haskell-CI config file."))
diffP = pure CommandDiffConfig

-------------------------------------------------------------------------------
-- Parsing helpers
Expand Down

0 comments on commit 8b5da14

Please sign in to comment.