mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 10:28:35 +00:00
feat: add AGENTS.md for quick start and CI guidelines; update documentation for dcr add and dcr build commands
This commit is contained in:
@@ -6,6 +6,7 @@ pub struct BuildRunFlags {
|
||||
pub target: Option<String>,
|
||||
pub force: bool,
|
||||
pub clean: bool,
|
||||
pub verbose: bool,
|
||||
}
|
||||
|
||||
pub fn parse_build_run_flags(args: &[String]) -> Result<BuildRunFlags, i32> {
|
||||
@@ -13,6 +14,7 @@ pub fn parse_build_run_flags(args: &[String]) -> Result<BuildRunFlags, i32> {
|
||||
let mut target = None;
|
||||
let mut force = false;
|
||||
let mut clean = false;
|
||||
let mut verbose = false;
|
||||
let mut iter = args.iter();
|
||||
|
||||
while let Some(arg) = iter.next() {
|
||||
@@ -29,6 +31,10 @@ pub fn parse_build_run_flags(args: &[String]) -> Result<BuildRunFlags, i32> {
|
||||
clean = true;
|
||||
continue;
|
||||
}
|
||||
if candidate == "verbose" {
|
||||
verbose = true;
|
||||
continue;
|
||||
}
|
||||
if candidate == "target" {
|
||||
if let Some(t) = iter.next() {
|
||||
target = Some(t.clone());
|
||||
@@ -55,5 +61,6 @@ pub fn parse_build_run_flags(args: &[String]) -> Result<BuildRunFlags, i32> {
|
||||
target,
|
||||
force,
|
||||
clean,
|
||||
verbose,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user