1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use std::path::PathBuf;
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[clap(name = "yard", author = "Henry McMahon", version = "0.3.5", about = "A declarative reusable decentralized approach for defining containers", long_about = None)]
pub struct Cli {
#[clap(subcommand)]
pub command: Commands,
}
#[derive(Subcommand)]
pub enum Commands {
/// Build Containerfiles from a `yard.yaml` file.
Build {
/// Path to the `yard.yaml` file.
#[clap(default_value = ".")]
path: PathBuf,
/// If set, any files required files for modules that already exist on the local path will not be refetched.
/// This may make building faster. And is also useful for testing - if you want to make sure a local file does not
/// get overriden.
#[clap(long, default_value = "false")]
do_not_refetch: bool,
},
/// Print output filenames in the order they are declared in `yard.yaml`.
OutputOrder {
/// Path to the `yard.yaml` file.
#[clap(default_value = ".")]
path: PathBuf,
},
/// Initialize a `yard.yaml` file.
Init {
/// Path to initialize the `yard.yaml` file.
#[clap(default_value = ".")]
path: PathBuf,
},
/// Updates all "commit" entries for each remote to the current "HEAD".
Update {
/// Path to the `yard.yaml` file.
#[clap(default_value = ".")]
path: PathBuf,
},
}