diff options
| -rwxr-xr-x | Omni/Ci.hs | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -34,7 +34,8 @@ Usage: ci [options] Options: - -h, --help Print this info + -r, --rerun Run CI even if already verified + -h, --help Print this info |] test :: Test.Tree @@ -46,7 +47,7 @@ test = ] move :: Cli.Arguments -> IO () -move _ = do +move args = do -- 1. Check for dirty worktree status <- readProcess "git" ["status", "-s"] "" unless (Text.null status) <| do @@ -75,7 +76,8 @@ move _ = do in ("Lint-is: good" `Text.isInfixOf` content) && ("Test-is: good" `Text.isInfixOf` content) _ -> False - when alreadyGood <| do + let isRerun = args `Cli.has` Cli.longOption "rerun" + when (alreadyGood && not isRerun) <| do Log.pass ["ci", "already verified"] Exit.exitSuccess |
