gitea-release/src/main.rs

30 lines
662 B
Rust
Raw Normal View History

use anyhow::Result;
2020-05-30 14:57:18 +00:00
use structopt::StructOpt;
2020-05-31 16:29:43 +00:00
mod changelog;
2020-05-30 16:24:04 +00:00
mod cmd;
2020-05-31 17:45:35 +00:00
mod git;
2020-05-31 17:05:32 +00:00
mod version;
2020-05-30 14:57:18 +00:00
2020-05-31 19:35:23 +00:00
pub(crate) use cmd::*;
2020-05-30 14:57:18 +00:00
// Name your user agent after your app?
pub(crate) static APP_USER_AGENT: &str =
concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"));
2020-05-30 14:57:18 +00:00
#[tokio::main]
async fn main() -> Result<()> {
let _ = kankyo::init();
2020-05-31 19:35:23 +00:00
let cmd = cmd::Cmd::from_args();
2020-05-30 14:57:18 +00:00
match cmd {
2020-05-31 19:35:23 +00:00
Cmd::DronePlugin { env } => cmd::drone_plugin::run(env).await,
2020-05-31 16:53:34 +00:00
Cmd::Release {
common,
changelog,
tag,
release_meta,
} => cmd::release::run(common, changelog, tag, release_meta).await,
2020-05-30 14:57:18 +00:00
}
}