Skip to content

Commit e17fb1d

Browse files
authored
Merge pull request #2509 from CosmWasm/fix-schema-generation
Fix schema generation scripts and remove outdated files
2 parents 7504832 + 043088b commit e17fb1d

File tree

5 files changed

+6
-71
lines changed

5 files changed

+6
-71
lines changed

contracts/hackatom/schema/raw/response_to_other_balance.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

contracts/ibc-reflect-send/src/bin/schema.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::env::current_dir;
2+
use std::fs::create_dir_all;
23

34
use cosmwasm_schema::{export_schema, export_schema_with_title, schema_for, write_api};
45

@@ -19,6 +20,7 @@ fn main() {
1920
let mut out_dir = current_dir().unwrap();
2021
out_dir.push("schema");
2122
out_dir.push("ibc");
23+
create_dir_all(&out_dir).unwrap();
2224
export_schema(&schema_for!(PacketMsg), &out_dir);
2325
export_schema_with_title(
2426
&schema_for!(AcknowledgementMsg<BalancesResponse>),

contracts/ibc-reflect/src/bin/schema.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::env::current_dir;
2+
use std::fs::create_dir_all;
23

34
use cosmwasm_schema::{export_schema, export_schema_with_title, schema_for, write_api};
45
use cosmwasm_std::Empty;
@@ -21,6 +22,7 @@ fn main() {
2122
let mut out_dir = current_dir().unwrap();
2223
out_dir.push("schema");
2324
out_dir.push("ibc");
25+
create_dir_all(&out_dir).unwrap();
2426
export_schema(&schema_for!(PacketMsg), &out_dir);
2527
export_schema_with_title(
2628
&schema_for!(AcknowledgementMsg<BalanceResponse>),

contracts/ibc2/schema/raw/execute.json

Lines changed: 0 additions & 31 deletions
This file was deleted.

devtools/update_schemas.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ command -v shellcheck >/dev/null && shellcheck "$0"
44

55
for contract_dir in contracts/*/; do
66
(
7+
echo "Updating schema for $contract_dir"
78
cd "$contract_dir"
9+
rm -r ./schema || true # ensure outdated schema files are deleted
810
cargo schema
911
)
1012
done

0 commit comments

Comments
 (0)