-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
104 lines (79 loc) · 3.08 KB
/
Copy pathMakefile
File metadata and controls
104 lines (79 loc) · 3.08 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# jigor: build, test and serve entry point.
#
# make build # debug build (lib + jigor binary + examples)
# make test # cargo unit tests + hurl integration tests
# make unit # cargo unit tests only
# make integration # hurl integration tests (spins up its own server)
# make serve # run the HTTP gateway (jigor serve, default :8000)
# make dev # run the decide example
# make bench # run the release benchmark example
# make lint # cargo clippy
# make fmt # cargo fmt (check mode: make fmt-check)
.DEFAULT_GOAL := build
# Server host/port (also honoured by the hurl runner).
JIGOR_HOST ?= 127.0.0.1
JIGOR_PORT ?= 8000
JIGOR_DEVICE?=
export JIGOR_DEVICE
.PHONY: build release unit integration cli test serve install publish published dev tweet tweet-test tagger tagger-test bench lint fmt fmt-check help
build:
cargo build
release:
cargo build --release
unit:
cargo test
integration:
bash tests/hurl/run.sh
cli:
bash tests/cli/ask.sh
test: unit integration cli
serve:
cargo build -p jigor-cli
./target/debug/jigor serve --host "$(JIGOR_HOST)" --port "$(JIGOR_PORT)"
install:
cargo install --path ./crates/jigor-cli --locked
publish:
cargo publish -p jigor
cargo publish -p jigor-cli
# Verify the workspace version is live on crates.io/PyPI/npm
# (override with: make published VERSION=x.y.z).
published:
bash scripts/check-published.sh $(VERSION)
dev:
cargo run -p jigor --example decide
tweet:
cargo run -p jigor --example tweet -- "We just crossed 10,000 paying customers. Thank you."
tweet-test:
cargo test -p jigor --example tweet
sales:
cargo run -p jigor --example sales -- "We just crossed 12,000 paying teams. The platform is an AI-native, next-gen solution. Founder pricing disappears at midnight, so sign today."
sales-test:
cargo test -p jigor --example sales
tagger:
cargo run -p jigor --example tagger -- --title "Hiring notes" --tags "work, ideas, personal" "Talked through the Q4 roadmap and the hiring push. Budget approved for two engineers."
tagger-test:
cargo test -p jigor --example tagger
bench:
cargo run -p jigor --release --example bench
lint:
cargo clippy --all-targets -- -D warnings
fmt:
cargo fmt
fmt-check:
cargo fmt --check
help:
@printf '%s\n' \
'jigor targets:' \
' build debug build (lib + jigor binary + examples)' \
' release release build of the jigor binary' \
' test unit tests + hurl integration tests' \
' unit cargo unit tests' \
' integration hurl integration tests (spins up its own server)' \
' serve run the HTTP server (JIGOR_HOST/JIGOR_PORT overridable)' \
' dev run the decide example' \
' tweet run the tweet example | tweet-test for its unit tests' \
' sales run the sales-pitch example | sales-test for its unit tests' \
' bench run the release benchmark' \
' lint cargo clippy --all-targets -D warnings' \
' fmt cargo fmt | fmt-check for check mode' \
' published check crates.io/PyPI/npm for the current version'