forked from Samuel1-ona/Hunty-contract
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 969 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (31 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
WASM_DIR := target/wasm32v1-none/release
BINDINGS_DIR := bindings
PYTHON ?= python3
DOCS_OUTPUT := docs/contract-api.md
.PHONY: build bindings all clean generate-api-docs check setup-githooks
all: build bindings
build: generate-api-docs
stellar contract build
generate-api-docs:
$(PYTHON) scripts/generate_api_docs.py --output $(DOCS_OUTPUT)
bindings: build
stellar contract bindings typescript \
--wasm $(WASM_DIR)/hunty_core.wasm \
--output-dir $(BINDINGS_DIR)/hunty-core \
--overwrite
stellar contract bindings typescript \
--wasm $(WASM_DIR)/reward_manager.wasm \
--output-dir $(BINDINGS_DIR)/reward-manager \
--overwrite
stellar contract bindings typescript \
--wasm $(WASM_DIR)/nft_reward.wasm \
--output-dir $(BINDINGS_DIR)/nft-reward \
--overwrite
check:
cargo fmt --all -- --check
cargo clippy --workspace -- -D warnings
cargo test --workspace --locked
setup-githooks:
git config core.hooksPath .githooks
clean:
cargo clean