generated from PlexSheep/rs-base
automatic cargo CI changes
This commit is contained in:
parent
2f8442bf74
commit
90312a457b
|
@ -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 git2;
|
||||||
use libpt::log::{debug, error, trace};
|
use libpt::log::{debug, error, trace};
|
||||||
|
@ -160,7 +162,11 @@ impl Version {
|
||||||
match self {
|
match self {
|
||||||
Self::Text(ver) => ver.clone(),
|
Self::Text(ver) => ver.clone(),
|
||||||
Self::Cmd(shell_command) => {
|
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) => {
|
Ok(output) => {
|
||||||
// TODO: check status
|
// TODO: check status
|
||||||
String::from_utf8(output.stdout).unwrap()
|
String::from_utf8(output.stdout).unwrap()
|
||||||
|
@ -169,7 +175,7 @@ impl Version {
|
||||||
panic!("{err:?}");
|
panic!("{err:?}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
Self::Cargo => todo!(),
|
Self::Cargo => todo!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ pub async fn tag(cfg: &Config) -> Result<git2::Tag> {
|
||||||
Ok(tag)
|
Ok(tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn push(cfg: &Config) -> Result<()> {
|
pub async fn push(_cfg: &Config) -> Result<()> {
|
||||||
// TODO: error handling
|
// TODO: error handling
|
||||||
// TODO: maybe using git as lib is fancier?
|
// TODO: maybe using git as lib is fancier?
|
||||||
Command::new("git").arg("push").status().unwrap();
|
Command::new("git").arg("push").status().unwrap();
|
||||||
|
|
|
@ -25,7 +25,7 @@ impl Forgejo {
|
||||||
"Authorization",
|
"Authorization",
|
||||||
// HeaderValue::from_str(api.auth.clone().unwrap().pass.get_pass()?.as_str())
|
// HeaderValue::from_str(api.auth.clone().unwrap().pass.get_pass()?.as_str())
|
||||||
// .map_err(ServerApiError::from)?,
|
// .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()
|
let client = super::client_builder()
|
||||||
|
|
Loading…
Reference in New Issue