Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
feat: add --version option to cib, cibtool
Lars Wirzenius committed 1 year ago
commit 128622370b5feaecb8811093895241af69f1d61c
parent 2be7b8b0e028cebaea027946fce34a40cbb9d1ae
3 files changed +27 -0
modified ci-broker.md
@@ -234,6 +234,31 @@ then stdout contains ""run_id": "xyzzy""
~~~


+
## Reports it version
+

+
_Want:_ `cib` and `cibtool` report their version, if invoked with the
+
`--version` potion.
+

+
_Why:_ This helps node operators include the version in any bug
+
reports.
+

+
_Who:_ Lars.
+

+
~~~scenario
+
given file radenv.sh
+
given file setup-node.sh
+
when I run bash radenv.sh bash setup-node.sh
+

+
given an installed cib
+
when I run cib --version
+
then stdout matches regex ^radicle-ci-broker \d+\.\d+\.\d+$
+

+
given an installed cibtool
+
when I run cibtool --version
+
then stdout matches regex ^radicle-ci-broker \d+\.\d+\.\d+$
+
~~~
+

+

## Adapter can provide URL for info on run

_Want:_ The adapter can provide a URL for information about the
modified src/bin/cib.rs
@@ -51,6 +51,7 @@ fn fallible_main() -> Result<(), CibError> {
}

#[derive(Debug, Parser)]
+
#[command(version)]
struct Args {
    #[clap(long)]
    config: PathBuf,
modified src/bin/cibtool.rs
@@ -64,6 +64,7 @@ fn fallible_main() -> Result<(), CibToolError> {
///
/// This tool can be used whether the CI broker is running or not.
#[derive(Parser)]
+
#[command(version)]
struct Args {
    /// Name of the SQLite database file. The file will be created if
    /// it does not already exist. Locking is handled automatically.