forked from tkhq/rust-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (38 loc) · 1.1 KB
/
Makefile
File metadata and controls
45 lines (38 loc) · 1.1 KB
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
40
41
42
43
44
45
.PHONY: generate
generate:
cargo run -p turnkey_codegen
cargo fmt --
@$(MAKE) strip-doc file=client/src/generated/google.api.rs
@$(MAKE) strip-doc file=client/src/generated/google.rpc.rs
@$(MAKE) strip-doc file=client/src/generated/grpc.gateway.protoc_gen_openapiv2.options.rs
# This is necessary for some google-generated files. They have non-valid comments that rustdoc tries to parse.
strip-doc:
@echo "Stripping /// doc comments from $(file)..."
@tmpfile=$$(mktemp) && \
awk '!/^[[:space:]]*\/{3}/' $(file) > $$tmpfile && \
mv $$tmpfile $(file)
.PHONY: check-generate
check-generate:
make generate
git diff --exit-code client/src/generated/client.rs
.PHONY: fmt
fmt:
cargo fmt --
.PHONY: lint
lint:
# Check formatting
cargo fmt -- --check
# Run Clippy
cargo clippy --all-targets --all-features -- -D warnings
.PHONY: build
build:
cargo build
.PHONY: test
test: build
cargo test
.PHONY: examples
examples: build
cargo run -p turnkey_examples --bin whoami
cargo run -p turnkey_examples --bin sub_organization
cargo run -p turnkey_examples --bin wallet
cargo run -p turnkey_examples --bin proofs