generated from PlexSheep/rs-base
automatic cargo CI changes
This commit is contained in:
parent
bd04eea9cc
commit
19d5d11b05
|
@ -10,7 +10,6 @@ use crate::error::*;
|
|||
pub mod cli;
|
||||
pub mod packages;
|
||||
use cli::Cli;
|
||||
use packages::*;
|
||||
|
||||
pub trait YamlConfigSection: Debug + Clone + for<'a> Deserialize<'a> {
|
||||
fn check(&self) -> Result<()>;
|
||||
|
@ -65,7 +64,7 @@ impl Pass {
|
|||
self.check()?;
|
||||
Ok(match self {
|
||||
Self::Text(pass) => pass.clone(),
|
||||
Self::Env(key) => std::env::var(key).map_err(|err| ConfigError::from(err))?,
|
||||
Self::Env(key) => std::env::var(key).map_err(ConfigError::from)?,
|
||||
Self::File(file) => std::fs::read_to_string(file)?,
|
||||
})
|
||||
}
|
||||
|
@ -75,10 +74,7 @@ impl YamlConfigSection for Pass {
|
|||
match self {
|
||||
Self::Text(_) => (),
|
||||
Self::Env(envvar) => {
|
||||
if !std::env::var(envvar)
|
||||
.map_err(ConfigError::from)?
|
||||
.is_empty()
|
||||
{
|
||||
if !std::env::var(envvar).map_err(ConfigError::from)?.is_empty() {
|
||||
} else {
|
||||
return Err(ConfigError::EnvNotSet(envvar.clone()).into());
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
pub enum PackageType {
|
||||
Cargo
|
||||
Cargo,
|
||||
}
|
||||
|
|
|
@ -22,6 +22,6 @@ pub async fn release(cfg: &Config, apis: &mut ApiCollection) -> Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
async fn tag(cfg: &Config) -> Result<()> {
|
||||
async fn tag(_cfg: &Config) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
|
|
@ -2,14 +2,14 @@ use async_trait::async_trait;
|
|||
|
||||
use super::ServerApi;
|
||||
use crate::{
|
||||
config::{packages::PackageType, ApiType, Config},
|
||||
config::{packages::PackageType, Config},
|
||||
error::*,
|
||||
};
|
||||
pub struct Forgejo;
|
||||
|
||||
#[async_trait]
|
||||
impl ServerApi for Forgejo {
|
||||
async fn init(&mut self, cfg: &Config) -> Result<()> {
|
||||
async fn init(&mut self, _cfg: &Config) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
async fn push_release(&mut self) -> Result<()> {
|
||||
|
@ -18,14 +18,13 @@ impl ServerApi for Forgejo {
|
|||
async fn push_release_artifact(&mut self) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
async fn push_pkg(&mut self, pkg_type: PackageType) -> Result<()> {
|
||||
async fn push_pkg(&mut self, _pkg_type: PackageType) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl Forgejo {
|
||||
pub async fn build(cfg: &Config) -> Result<Self> {
|
||||
pub async fn build(_cfg: &Config) -> Result<Self> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,14 +2,14 @@ use async_trait::async_trait;
|
|||
|
||||
use super::ServerApi;
|
||||
use crate::{
|
||||
config::{packages::PackageType, ApiType, Config},
|
||||
config::{packages::PackageType, Config},
|
||||
error::*,
|
||||
};
|
||||
pub struct Gitea;
|
||||
|
||||
#[async_trait]
|
||||
impl ServerApi for Gitea {
|
||||
async fn init(&mut self, cfg: &Config) -> Result<()> {
|
||||
async fn init(&mut self, _cfg: &Config) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
async fn push_release(&mut self) -> Result<()> {
|
||||
|
@ -18,13 +18,13 @@ impl ServerApi for Gitea {
|
|||
async fn push_release_artifact(&mut self) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
async fn push_pkg(&mut self, pkg_type: PackageType) -> Result<()> {
|
||||
async fn push_pkg(&mut self, _pkg_type: PackageType) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Gitea {
|
||||
pub async fn build(cfg: &Config) -> Result<Self> {
|
||||
pub async fn build(_cfg: &Config) -> Result<Self> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,14 +2,14 @@ use async_trait::async_trait;
|
|||
|
||||
use super::ServerApi;
|
||||
use crate::{
|
||||
config::{packages::PackageType, ApiType, Config},
|
||||
config::{packages::PackageType, Config},
|
||||
error::*,
|
||||
};
|
||||
pub struct Github;
|
||||
|
||||
#[async_trait]
|
||||
impl ServerApi for Github {
|
||||
async fn init(&mut self, cfg: &Config) -> Result<()> {
|
||||
async fn init(&mut self, _cfg: &Config) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
async fn push_release(&mut self) -> Result<()> {
|
||||
|
@ -18,13 +18,13 @@ impl ServerApi for Github {
|
|||
async fn push_release_artifact(&mut self) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
async fn push_pkg(&mut self, pkg_type: PackageType) -> Result<()> {
|
||||
async fn push_pkg(&mut self, _pkg_type: PackageType) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Github {
|
||||
pub async fn build(cfg: &Config) -> Result<Self> {
|
||||
pub async fn build(_cfg: &Config) -> Result<Self> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,14 +2,14 @@ use async_trait::async_trait;
|
|||
|
||||
use super::ServerApi;
|
||||
use crate::{
|
||||
config::{packages::PackageType, ApiType, Config},
|
||||
config::{packages::PackageType, Config},
|
||||
error::*,
|
||||
};
|
||||
pub struct Gitlab;
|
||||
|
||||
#[async_trait]
|
||||
impl ServerApi for Gitlab {
|
||||
async fn init(&mut self, cfg: &Config) -> Result<()> {
|
||||
async fn init(&mut self, _cfg: &Config) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
async fn push_release(&mut self) -> Result<()> {
|
||||
|
@ -18,13 +18,13 @@ impl ServerApi for Gitlab {
|
|||
async fn push_release_artifact(&mut self) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
async fn push_pkg(&mut self, pkg_type: PackageType) -> Result<()> {
|
||||
async fn push_pkg(&mut self, _pkg_type: PackageType) -> Result<()> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl Gitlab {
|
||||
pub async fn build(cfg: &Config) -> Result<Self> {
|
||||
pub async fn build(_cfg: &Config) -> Result<Self> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue