pub enum StepSubCommand {
    New {
        step_name: String,
        command: String,
        when: Option<XvcStepInvalidate>,
    },
    Update {
        step_name: String,
        command: Option<String>,
        when: Option<XvcStepInvalidate>,
    },
    Dependency {
        step_name: String,
        generics: Option<Vec<String>>,
        urls: Option<Vec<String>>,
        files: Option<Vec<String>>,
        steps: Option<Vec<String>>,
        glob_items: Option<Vec<String>>,
        globs: Option<Vec<String>>,
        params: Option<Vec<String>>,
        regex_items: Option<Vec<String>>,
        regexes: Option<Vec<String>>,
        line_items: Option<Vec<String>>,
        lines: Option<Vec<String>>,
    },
    Output {
        step_name: String,
        files: Option<Vec<String>>,
        metrics: Option<Vec<String>>,
        images: Option<Vec<String>>,
    },
    Show {
        step_name: String,
    },
}
Expand description

Step management subcommands

Variants§

§

New

Fields

§step_name: String

Name of the new step

§command: String

Step command to run

§when: Option<XvcStepInvalidate>

When to run the command. One of always, never, by_dependencies (default). This is used to freeze or invalidate a step manually.

Add a new step

§

Update

Fields

§step_name: String

Name of the step to update. The step should already be defined.

§command: Option<String>

Step command to run

§when: Option<XvcStepInvalidate>

When to run the command. One of always, never, by_dependencies (default). This is used to freeze or invalidate a step manually.

Update a step’s command or when options.

§

Dependency

Fields

§step_name: String

Name of the step to add the dependency to

§generics: Option<Vec<String>>

Add a generic command output as a dependency. Can be used multiple times. Please delimit the command with ’ ’ to avoid shell expansion.

§urls: Option<Vec<String>>

Add a URL dependency to the step. Can be used multiple times.

§files: Option<Vec<String>>

Add a file dependency to the step. Can be used multiple times.

§steps: Option<Vec<String>>

Add a step dependency to a step. Can be used multiple times. Steps are referred with their names.

§glob_items: Option<Vec<String>>

Add a glob items dependency to the step.

You can depend on multiple files and directories with this dependency.

The difference between this and the glob option is that this option keeps track of all matching files, but glob only keeps track of the matched files’ digest. When you want to use ${XVC_GLOB_ITEMS}, ${XVC_ADDED_GLOB_ITEMS}, or ${XVC_REMOVED_GLOB_ITEMS} environment variables in the step command, use the glob-items dependency. Otherwise, you can use the glob option to save disk space.

§globs: Option<Vec<String>>

Add a glob dependency to the step. Can be used multiple times.

You can depend on multiple files and directories with this dependency.

The difference between this and the glob-items option is that the glob-items option keeps track of all matching files individually, but this option only keeps track of the matched files’ digest. This dependency uses considerably less disk space.

§params: Option<Vec<String>>

Add a parameter dependency to the step in the form filename.yaml::model.units . Can be used multiple times.

§regex_items: Option<Vec<String>>

Add a regex dependency in the form filename.txt:/^regex/ . Can be used multiple times.

The difference between this and the regex option is that the regex-items option keeps track of all matching lines, but regex only keeps track of the matched lines’ digest. When you want to use ${XVC_REGEX_ITEMS}, ${XVC_ADDED_REGEX_ITEMS}, ${XVC_REMOVED_REGEX_ITEMS} environment variables in the step command, use the regex option. Otherwise, you can use the regex-digest option to save disk space.

§regexes: Option<Vec<String>>

Add a regex dependency in the form filename.txt:/^regex/ . Can be used multiple times.

The difference between this and the regex option is that the regex option keeps track of all matching lines that can be used in the step command. This option only keeps track of the matched lines’ digest.

§line_items: Option<Vec<String>>

Add a line dependency in the form filename.txt::123-234

The difference between this and the lines option is that the line-items option keeps track of all matching lines that can be used in the step command. This option only keeps track of the matched lines’ digest. When you want to use ${XVC_ALL_LINE_ITEMS}, ${XVC_ADDED_LINE_ITEMS}, ${XVC_CHANGED_LINE_ITEMS} options in the step command, use the line option. Otherwise, you can use the lines option to save disk space.

§lines: Option<Vec<String>>

Add a line digest dependency in the form filename.txt::123-234

The difference between this and the line-items dependency is that the line option keeps track of all matching lines that can be used in the step command. This option only keeps track of the matched lines’ digest. If you don’t need individual lines to be kept, use this option to save space.

Add a dependency to a step

§

Output

Fields

§step_name: String

Name of the step to add the output to

§files: Option<Vec<String>>

Add a file output to the step. Can be used multiple times.

§metrics: Option<Vec<String>>

Add a metric output to the step. Can be used multiple times.

§images: Option<Vec<String>>

Add an image output to the step. Can be used multiple times.

Add an output to a step

§

Show

Fields

§step_name: String

Name of the step to show

Print step configuration

Trait Implementations§

source§

impl Clone for StepSubCommand

source§

fn clone(&self) -> StepSubCommand

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CommandFactory for StepSubCommand

source§

fn command<'b>() -> Command

Build a [Command] that can instantiate Self. Read more
source§

fn command_for_update<'b>() -> Command

Build a [Command] that can update self. Read more
source§

impl Debug for StepSubCommand

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromArgMatches for StepSubCommand

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Parser for StepSubCommand

§

fn parse() -> Self

Parse from std::env::args_os(), exit on error
§

fn try_parse() -> Result<Self, Error<RichFormatter>>

Parse from std::env::args_os(), return Err on error.
§

fn parse_from<I, T>(itr: I) -> Selfwhere I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error
§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error<RichFormatter>>where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
§

fn update_from<I, T>(&mut self, itr: I)where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error
§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error<RichFormatter>>where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.
source§

impl Subcommand for StepSubCommand

source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self. Read more
source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can update self. Read more
source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more