autocrate/src/release/mod.rs

32 lines
690 B
Rust
Raw Normal View History

use crate::{config::Config, error::*, serverapi::ApiCollection};
2024-02-16 18:58:20 +01:00
2024-02-24 14:33:58 +01:00
pub struct ReleaseContext {
pub draft: bool,
pub prerelease: bool,
pub username: String,
pub repository: String,
pub text: String,
pub tag: String,
pub commit_sig: String
}
2024-02-24 13:24:14 +01:00
pub async fn release(cfg: &Config, apis: &mut ApiCollection) -> Result<()> {
2024-02-16 20:00:55 +01:00
// TODO: git tag
// TODO: push to each server
2024-02-19 22:07:51 +01:00
2024-02-16 20:00:55 +01:00
// TODO: release to each server
2024-02-19 22:07:51 +01:00
tag(cfg).await?;
2024-02-24 14:33:58 +01:00
todo!();
2024-02-19 22:07:51 +01:00
// TODO: check that the release is made
// TODO: generate artifacts
// TODO: upload artifacts
// TODO: upload artifact signatures
Ok(())
}
2024-02-24 12:28:29 +00:00
async fn tag(_cfg: &Config) -> Result<()> {
2024-02-16 18:58:20 +01:00
todo!()
}