automatic cargo CI changes

This commit is contained in:
PlexSheep 2024-02-25 00:18:12 +00:00 committed by github-actions[bot]
parent 2f8442bf74
commit 90312a457b
3 changed files with 11 additions and 5 deletions

View File

@ -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!(),
}
}

View File

@ -34,7 +34,7 @@ pub async fn tag(cfg: &Config) -> Result<git2::Tag> {
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();

View File

@ -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()