diff --git a/crates/drone-templater/src/main.rs b/crates/drone-templater/src/main.rs index b81bc6f..78fb65d 100644 --- a/crates/drone-templater/src/main.rs +++ b/crates/drone-templater/src/main.rs @@ -67,6 +67,24 @@ async fn main() -> anyhow::Result<()> { ); let client = reqwest::Client::new(); + + match client + .delete(&template_url) + .bearer_auth(&drone_token) + .send() + .await + { + Ok(res) => match res.error_for_status() { + Ok(_) => {} + Err(status) => { + tracing::warn!("failed to delete template {}", status); + } + }, + Err(e) => { + tracing::error!("{}", e); + } + } + let res = client .put(&template_url) .bearer_auth(&drone_token)