summaryrefslogtreecommitdiff
path: root/Omni/Ci.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-23 07:44:58 -0500
committerBen Sima <ben@bensima.com>2025-12-23 07:44:58 -0500
commit79f2a8bfbf0d8b7e96374b91b991db7df59e5088 (patch)
tree36f58879e42bef6ad818dbf441bbd5a2caa5609c /Omni/Ci.hs
parent855e5f3fa8971034a5a5503479e1282e01c5d81c (diff)
Omni/Ci: add --rerun flag to bypass already verified check
- Add -r, --rerun option to run CI even when already verified - Allows re-running CI for testing or validation purposes - Fixes "verification failed" error when wanting to rerun CI 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'Omni/Ci.hs')
-rwxr-xr-xOmni/Ci.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Omni/Ci.hs b/Omni/Ci.hs
index 4b40de9..bedeab7 100755
--- a/Omni/Ci.hs
+++ b/Omni/Ci.hs
@@ -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