From 5009f11cf3806e11b8162786d0ffae282f9c0256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 4 Feb 2025 21:45:24 +0100 Subject: Add explicit --since-upstream option to run command Changelog: Add explicit `--since-upstream` option for the `run` command --- README.md | 6 ++++++ src/Command/Run.hs | 44 ++++++++++++++++++++++++++++++++------------ 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 80dca34..d82cb47 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,10 @@ To run jobs for commits that are in local ``, but not yet in its upstrea ``` minici run ``` +or: +``` +minici run --since-upstream= +``` For current branch, the name can be omitted: ``` @@ -76,3 +80,5 @@ To watch new tags and run jobs for each tag matching given pattern: ``` minici run --new-tags= ``` + +The above options `--range`, `--since-upstream`, etc can be arbitrarily combined. diff --git a/src/Command/Run.hs b/src/Command/Run.hs index 45056f5..e2e7cc0 100644 --- a/src/Command/Run.hs +++ b/src/Command/Run.hs @@ -32,6 +32,7 @@ data RunCommand = RunCommand RunOptions [ Text ] data RunOptions = RunOptions { roRanges :: [ Text ] + , roSinceUpstream :: [ Text ] , roNewCommitsOn :: [ Text ] , roNewTags :: [ Pattern ] } @@ -45,9 +46,9 @@ instance Command RunCommand where commandUsage _ = T.pack $ unlines $ [ "Usage: minici run" , " run jobs for commits on current branch not yet in upstream branch" - , " or: minici run " + , " or: minici run [--since-upstream=]" , " run jobs for commits on not yet in its upstream ref" - , " or: minici run .." + , " or: minici run [--range=].." , " run jobs for commits in given range" , " or: minici run