Skip to content

Commit

Permalink
fix: update abella damf tool and lang cids to be consistent with the …
Browse files Browse the repository at this point in the history
…updated formats

- (`content` as directly included in the language or tool object's json rather than as an unnecessary separate cid)
  • Loading branch information
innofarah committed May 8, 2024
1 parent c7285e0 commit ab25f2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
28 changes: 10 additions & 18 deletions gen/damf_cids.ml
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,22 @@ let () =
Arg.parse options (fun _ -> failwith "bad arguments") usage_message ;
if !output_file = "" then
failwith "Needs an output file" ;
let tool_json : Json.t = `Assoc [
"name", `String "Abella" ;
"version", `String version ;
"tag", `String ("Abella " ^ version) ;
] in
let cid =
run_command "ipfs dag put" (fun oc -> Json.to_channel oc tool_json) |>
String.trim in
let tool_json : Json.t = `Assoc [
"format", `String "tool" ;
"content", `Assoc [ "/", `String cid ]
"content", `Assoc [
"name", `String "Abella" ;
"version", `String version ;
"tag", `String ("Abella " ^ version) ;
]
] in
let tool_cid = String.trim @@ run_command "ipfs dag put" (fun oc -> Json.to_channel oc tool_json) in
let lang_json : Json.t = `Assoc [
"name", `String "Abella" ;
"version", `String version ;
"tag", `String ("Abella " ^ version) ;
] in
let cid =
run_command "ipfs dag put" (fun oc -> Json.to_channel oc lang_json) |>
String.trim in
let lang_json : Json.t = `Assoc [
"format", `String "language" ;
"content", `Assoc [ "/", `String cid ]
"content", `Assoc [
"name", `String "Abella" ;
"version", `String version ;
"tag", `String ("Abella " ^ version) ;
]
] in
let lang_cid = String.trim @@ run_command "ipfs dag put" (fun oc -> Json.to_channel oc lang_json) in
let oc = open_out !output_file in
Expand Down
4 changes: 2 additions & 2 deletions src/damf_cids.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(* This file is generated. Do not edit! *)
(* dune exec ../gen/damf_cids.ml -- -o damf_cids.ml *)
let language_cid = "bafyreic7eqwwwbjtrbcz4fj33wdoyt6qext6ji46vggwjjliznyzvaymoy";;
let tool_cid = "bafyreiegwjyj5f2lpw3ck35pqeqt45bwl57c7n7xfpbtxm6ym3sfsixixq";;
let language_cid = "bafyreiga2dpaxobxqvvy2akl2frrap2xzw5xrq2olpfnv5q5e362vaua5q";;
let tool_cid = "bafyreiehnznomgmy3u724hk4jhhkvsnwgoavyva5kbxoeqfhl5epn6ev6a";;

0 comments on commit ab25f2e

Please sign in to comment.