diff --git a/.circleci/config.yml b/.circleci/config.yml index c18302790..ccca8273f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -772,19 +772,20 @@ jobs: - run: name: Build and run schema generator for packages command: | - for S in ./packages/*/examples/schema.rs + for S in ./packages/*/src/bin/schema.rs do - P=$(dirname $S)/.. + P=$(dirname $S)/../.. echo "Generating schema for $P ..." (cd $P && cargo schema --locked && tar -zcf ~/project/schemas/$(basename $(pwd))_schema.tar.gz ./schema) done - run: name: Build and run schema generator for contracts command: | + export GLOBIGNORE='./contracts/cw1-whitelist-ng/' for C in ./contracts/*/ do echo "Generating schema for $C ..." - (cd $C && cargo schema --locked && tar -zcf ~/project/schemas/$(basename $(pwd))_schema.tar.gz ./schema) + (cd $C && cargo schema --locked && mv ./schema/*.json ~/project/schemas/) done - run: name: Show data diff --git a/packages/cw1/.cargo/config b/packages/cw1/.cargo/config index b613a59f1..628e18e5b 100644 --- a/packages/cw1/.cargo/config +++ b/packages/cw1/.cargo/config @@ -1,4 +1,4 @@ [alias] -wasm = "build --release --target wasm32-unknown-unknown" -wasm-debug = "build --target wasm32-unknown-unknown" -schema = "run --example schema" +wasm = "build --release --lib --target wasm32-unknown-unknown" +wasm-debug = "build --lib --target wasm32-unknown-unknown" +schema = "run --bin schema" diff --git a/packages/cw1/examples/schema.rs b/packages/cw1/src/bin/schema.rs similarity index 100% rename from packages/cw1/examples/schema.rs rename to packages/cw1/src/bin/schema.rs diff --git a/packages/cw1155/.cargo/config b/packages/cw1155/.cargo/config index b613a59f1..628e18e5b 100644 --- a/packages/cw1155/.cargo/config +++ b/packages/cw1155/.cargo/config @@ -1,4 +1,4 @@ [alias] -wasm = "build --release --target wasm32-unknown-unknown" -wasm-debug = "build --target wasm32-unknown-unknown" -schema = "run --example schema" +wasm = "build --release --lib --target wasm32-unknown-unknown" +wasm-debug = "build --lib --target wasm32-unknown-unknown" +schema = "run --bin schema" diff --git a/packages/cw1155/examples/schema.rs b/packages/cw1155/src/bin/schema.rs similarity index 100% rename from packages/cw1155/examples/schema.rs rename to packages/cw1155/src/bin/schema.rs diff --git a/packages/cw20/.cargo/config b/packages/cw20/.cargo/config index b613a59f1..628e18e5b 100644 --- a/packages/cw20/.cargo/config +++ b/packages/cw20/.cargo/config @@ -1,4 +1,4 @@ [alias] -wasm = "build --release --target wasm32-unknown-unknown" -wasm-debug = "build --target wasm32-unknown-unknown" -schema = "run --example schema" +wasm = "build --release --lib --target wasm32-unknown-unknown" +wasm-debug = "build --lib --target wasm32-unknown-unknown" +schema = "run --bin schema" diff --git a/packages/cw20/examples/schema.rs b/packages/cw20/src/bin/schema.rs similarity index 100% rename from packages/cw20/examples/schema.rs rename to packages/cw20/src/bin/schema.rs diff --git a/packages/cw3/.cargo/config b/packages/cw3/.cargo/config index b613a59f1..628e18e5b 100644 --- a/packages/cw3/.cargo/config +++ b/packages/cw3/.cargo/config @@ -1,4 +1,4 @@ [alias] -wasm = "build --release --target wasm32-unknown-unknown" -wasm-debug = "build --target wasm32-unknown-unknown" -schema = "run --example schema" +wasm = "build --release --lib --target wasm32-unknown-unknown" +wasm-debug = "build --lib --target wasm32-unknown-unknown" +schema = "run --bin schema" diff --git a/packages/cw3/examples/schema.rs b/packages/cw3/src/bin/schema.rs similarity index 100% rename from packages/cw3/examples/schema.rs rename to packages/cw3/src/bin/schema.rs diff --git a/packages/cw4/.cargo/config b/packages/cw4/.cargo/config index b613a59f1..628e18e5b 100644 --- a/packages/cw4/.cargo/config +++ b/packages/cw4/.cargo/config @@ -1,4 +1,4 @@ [alias] -wasm = "build --release --target wasm32-unknown-unknown" -wasm-debug = "build --target wasm32-unknown-unknown" -schema = "run --example schema" +wasm = "build --release --lib --target wasm32-unknown-unknown" +wasm-debug = "build --lib --target wasm32-unknown-unknown" +schema = "run --bin schema" diff --git a/packages/cw4/examples/schema.rs b/packages/cw4/src/bin/schema.rs similarity index 100% rename from packages/cw4/examples/schema.rs rename to packages/cw4/src/bin/schema.rs