File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 2
2
resolver = " 2"
3
3
4
4
members = [
5
- " crates/big-cell-fetcher" ,
6
- " crates/big-witness-hasher" ,
7
- " contracts/atomics-without-a" ,
8
- " contracts/legacy-c-dependency" ,
9
- " contracts/loads-of-hashes" ,
10
- " contracts/minimal-log" ,
11
- " contracts/stack-reorder" ,
5
+ # Please don't remove the following line, we use it to automatically
6
+ # detect insertion point for newly generated crates.
7
+ # @@INSERTION_POINT@@
12
8
" tests" ,
13
9
]
14
10
Original file line number Diff line number Diff line change @@ -83,6 +83,23 @@ clean:
83
83
rm -rf build
84
84
cargo clean
85
85
86
+ TEMPLATE_REPO := https://github.com/xxuejie/ckb-script-templates
87
+ CRATE :=
88
+ TEMPLATE := contract
89
+ DESTINATION := contracts
90
+ generate :
91
+ @set -eu; \
92
+ if [ " x$( CRATE) " = " x" ]; then \
93
+ cargo generate --git $(TEMPLATE_REPO ) $(TEMPLATE ) \
94
+ --destination $(DESTINATION ) ; \
95
+ echo " Please update workspace-level Cargo.toml so members include the newly created crate!" ; \
96
+ else \
97
+ cargo generate --git $(TEMPLATE_REPO ) $(TEMPLATE ) \
98
+ --destination $(DESTINATION ) \
99
+ --name $(CRATE ) ; \
100
+ sed -i ' /@@INSERTION_POINT@@/a \ \ "$(DESTINATION)/$(CRATE)",' Cargo.toml; \
101
+ fi
102
+
86
103
prepare :
87
104
rustup target add riscv64imac-unknown-none-elf
88
105
You can’t perform that action at this time.
0 commit comments