Skip to content

Commit f0c684b

Browse files
committed
Add param to specify template source type
1 parent f06d7b1 commit f0c684b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

workspace/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,19 @@ clean:
8383
rm -rf build
8484
cargo clean
8585

86+
TEMPLATE_TYPE := --git
8687
TEMPLATE_REPO := https://github.com/xxuejie/ckb-script-templates
8788
CRATE :=
8889
TEMPLATE := contract
8990
DESTINATION := contracts
9091
generate:
9192
@set -eu; \
9293
if [ "x$(CRATE)" = "x" ]; then \
93-
cargo generate --git $(TEMPLATE_REPO) $(TEMPLATE) \
94+
cargo generate $(TEMPLATE_TYPE) $(TEMPLATE_REPO) $(TEMPLATE) \
9495
--destination $(DESTINATION); \
9596
echo "Please update workspace-level Cargo.toml so members include the newly created crate!"; \
9697
else \
97-
cargo generate --git $(TEMPLATE_REPO) $(TEMPLATE) \
98+
cargo generate $(TEMPLATE_TYPE) $(TEMPLATE_REPO) $(TEMPLATE) \
9899
--destination $(DESTINATION) \
99100
--name $(CRATE); \
100101
sed -i '/@@INSERTION_POINT@@/a \ \ "$(DESTINATION)/$(CRATE)",' Cargo.toml; \

0 commit comments

Comments
 (0)