From 90312a457b3fa07992b867051b84a50d3935221a Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 25 Feb 2024 00:18:12 +0000 Subject: [PATCH] automatic cargo CI changes --- src/config/mod.rs | 12 +++++++++--- src/git/mod.rs | 2 +- src/serverapi/forgejo.rs | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index bdbbfaf..74075f7 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1,4 +1,6 @@ -use std::{collections::HashMap, fmt::Debug, fs::File, io::BufReader, path::PathBuf, process::Command}; +use std::{ + collections::HashMap, fmt::Debug, fs::File, io::BufReader, path::PathBuf, process::Command, +}; use git2; use libpt::log::{debug, error, trace}; @@ -160,7 +162,11 @@ impl Version { match self { Self::Text(ver) => ver.clone(), Self::Cmd(shell_command) => { - match Command::new("/bin/bash").arg("-c").arg(shell_command).output() { + match Command::new("/bin/bash") + .arg("-c") + .arg(shell_command) + .output() + { Ok(output) => { // TODO: check status String::from_utf8(output.stdout).unwrap() @@ -169,7 +175,7 @@ impl Version { panic!("{err:?}"); } } - }, + } Self::Cargo => todo!(), } } diff --git a/src/git/mod.rs b/src/git/mod.rs index 99ecd01..6201cbe 100644 --- a/src/git/mod.rs +++ b/src/git/mod.rs @@ -34,7 +34,7 @@ pub async fn tag(cfg: &Config) -> Result { Ok(tag) } -pub async fn push(cfg: &Config) -> Result<()> { +pub async fn push(_cfg: &Config) -> Result<()> { // TODO: error handling // TODO: maybe using git as lib is fancier? Command::new("git").arg("push").status().unwrap(); diff --git a/src/serverapi/forgejo.rs b/src/serverapi/forgejo.rs index 7e5adfc..45aa20a 100644 --- a/src/serverapi/forgejo.rs +++ b/src/serverapi/forgejo.rs @@ -25,7 +25,7 @@ impl Forgejo { "Authorization", // HeaderValue::from_str(api.auth.clone().unwrap().pass.get_pass()?.as_str()) // .map_err(ServerApiError::from)?, - HeaderValue::from_str("hardcoded").map_err(ServerApiError::from)? + HeaderValue::from_str("hardcoded").map_err(ServerApiError::from)?, ); } let client = super::client_builder()