From 6ef4bdf587e4aea290b722e7a0aed3184e72d6bb Mon Sep 17 00:00:00 2001 From: kjuulh Date: Tue, 14 Mar 2023 21:49:30 +0100 Subject: [PATCH] refactor: add basic cargo make gen command --- Makefile.toml | 17 +++++++++++++++++ crates/dagger-sdk/src/gen.rs | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 6fa2931..43dc40e 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -3,6 +3,19 @@ command = "cargo" args = ["run", "-p", "ci", "--", "codegen"] workspace = false +[tasks.local_codegen] +command = "cargo" +args = [ + "run", + "-p", + "dagger-rs", + "--", + "generate", + "--output", + "crates/dagger-sdk/src/gen.rs", +] +workspace = false + [tasks.build] command = "cargo" args = ["run", "-p", "ci", "--", "ci"] @@ -20,6 +33,10 @@ args = ["fix", "--workspace", "--allow-dirty"] dependencies = ["fmt"] workspace = false +[tasks.gen] +dependencies = ["local_codegen", "fmt", "fix"] +workspace = false + [tasks.release_crate] command = "cargo" args = [ diff --git a/crates/dagger-sdk/src/gen.rs b/crates/dagger-sdk/src/gen.rs index c794c0d..85ad27b 100644 --- a/crates/dagger-sdk/src/gen.rs +++ b/crates/dagger-sdk/src/gen.rs @@ -111,8 +111,8 @@ pub struct BuildArg { } #[derive(Serialize, Deserialize, Debug, PartialEq, Clone)] pub struct PipelineLabel { - pub value: String, pub name: String, + pub value: String, } #[derive(Debug, Clone)] pub struct CacheVolume { @@ -2848,9 +2848,9 @@ impl Socket { } #[derive(Serialize, Deserialize, Clone, PartialEq, Debug)] pub enum CacheSharingMode { - LOCKED, SHARED, PRIVATE, + LOCKED, } #[derive(Serialize, Deserialize, Clone, PartialEq, Debug)] pub enum NetworkProtocol {