Explorar o código

Adding support for idl.json (#2114)

Italo Casas %!s(int64=2) %!d(string=hai) anos
pai
achega
11af9a6624
Modificáronse 2 ficheiros con 5 adicións e 0 borrados
  1. 1 0
      cli/src/config.rs
  2. 4 0
      cli/src/lib.rs

+ 1 - 0
cli/src/config.rs

@@ -588,6 +588,7 @@ fn deser_programs(
                                 path: None,
                                 idl: None,
                             },
+
                             serde_json::Value::Object(_) => {
                                 serde_json::from_value(program_id.clone())
                                     .map_err(|_| anyhow!("Unable to read toml"))?

+ 4 - 0
cli/src/lib.rs

@@ -2916,6 +2916,10 @@ fn publish(
         println!("PACKING: README.md");
         tar.append_path("README.md")?;
     }
+    if Path::new("idl.json").exists() {
+        println!("PACKING: idl.json");
+        tar.append_path("idl.json")?;
+    }
 
     // All workspace programs.
     for path in cfg.get_program_list()? {