From 663a4fda12ab008a052c459902436d80c090fc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 31 Oct 2026 10:05:00 +0100 Subject: Watch expressions documentation Changelog: Added flexible expressions to select or watch commit ranges and tags. --- README.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index f260f67..e56fec3 100644 --- a/README.md +++ b/README.md @@ -62,10 +62,8 @@ To run jobs for a git commit range: minici run .. ``` -or: -``` -minici run --range=.. -``` +See [watch expressions](#watch-expressions) below for details of supported expressions. + To run jobs for commits that are in local ``, but not yet in its upstream: ``` @@ -88,12 +86,56 @@ To watch changes on given `` and run jobs for each new commit: minici run --new-commits-on= ``` +or equivalently: +``` +minici run '..watch()' +``` + 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. +or equivalently: +``` +minici run 'newtags()' +``` + +The above expressions and options can be arbitrarily combined. + + +Watch expressions +----------------- + +The `run` command accepts `` to describe set of commits for which +to execute the jobs, potentially watching for changes in repository branches or +tags. The `` can be of the form: + +* `..` giving range of commits; + +* `` giving single commit; + +* `tags()` denoting list of all tags matching given ``; + +* `watch()` is an expression initially equivalent to its parameter, + but `minici` continues to watch the repository for changes affecting the + expression and creates or cancels additional jobs as the value of the + expression changes. + +Where `` can be: + +* ``, e.g. the git commit hash; + +* `highesttag()`, which from all the tags matching ``, selects + the highest one as given by natural/version sort (e.g. `v10.2` > `v9.4`); + +* `lasttag()`, which from all the tags matching ``, selects + the last created one (as given by the `tagger` date in tag object); + +* `watch()` is analogous to `watch` for ``. + +And `` is a shell glob pattern, as implemented +by the [Glob package](https://hackage.haskell.org/package/Glob/docs/System-FilePath-Glob.html#v:compile). Explicit script file -- cgit v1.2.3