generated from PlexSheep/rs-base
Merge branch 'devel' of https://git.cscherr.de/PlexSheep/autocrate into devel
cargo devel CI / cargo CI (push) Successful in 3m43s
Details
cargo devel CI / cargo CI (push) Successful in 3m43s
Details
This commit is contained in:
commit
660d4bd9da
|
@ -28,7 +28,7 @@ impl Changelog {
|
|||
let out = cmd.output()?;
|
||||
// FIXME: this does not catch fancy colors, those are from the shell as it seems? I don't
|
||||
// get it.
|
||||
let buf = String::from_utf8(out.stdout).map_err(|err| ChangelogError::GitUTF8Error(err))?;
|
||||
let buf = String::from_utf8(out.stdout).map_err(ChangelogError::GitUTF8Error)?;
|
||||
if !out.status.success() {
|
||||
// TODO: get the stderr for error reporting
|
||||
// TODO: Make the error more understandable for the user
|
||||
|
@ -43,14 +43,14 @@ impl Changelog {
|
|||
let mut cmd = Command::new("git");
|
||||
cmd.arg("describe").arg("--tags").arg("--abbrev=0");
|
||||
let out = cmd.output()?;
|
||||
let buf = String::from_utf8(out.stdout).map_err(|err| ChangelogError::GitUTF8Error(err))?;
|
||||
let buf = String::from_utf8(out.stdout).map_err(ChangelogError::GitUTF8Error)?;
|
||||
if !out.status.success() {
|
||||
// TODO: get the stderr for error reporting
|
||||
// TODO: Make the error more understandable for the user
|
||||
return Err(ChangelogError::GitBadStatus(out.status, buf).into());
|
||||
}
|
||||
let buf = buf.replace("\n", "");
|
||||
return Ok(buf);
|
||||
let buf = buf.replace('\n', "");
|
||||
Ok(buf)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,6 +95,6 @@ impl Cli {
|
|||
// less verbose version
|
||||
Logger::init_mini(Some(ll)).expect("could not initialize Logger");
|
||||
}
|
||||
return cli;
|
||||
cli
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ impl Debug for Config {
|
|||
write!(
|
||||
f,
|
||||
"{}",
|
||||
format!(
|
||||
format_args!(
|
||||
"Config {{yaml: {:?}, repo_path: {:?}}}",
|
||||
self.yaml, self.path
|
||||
)
|
||||
|
|
|
@ -14,8 +14,7 @@ async fn main() -> Result<()> {
|
|||
|
||||
match cli.command {
|
||||
Commands::Changelog { .. } => {
|
||||
println!("{}", Changelog::build(&cfg)?.to_string());
|
||||
// Ok(())
|
||||
println!("{}", Changelog::build(&cfg)?);
|
||||
}
|
||||
Commands::Release { .. } => {
|
||||
todo!()
|
||||
|
@ -24,7 +23,5 @@ async fn main() -> Result<()> {
|
|||
todo!()
|
||||
}
|
||||
};
|
||||
|
||||
println!("foo");
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue