forked from tinysearch/tinysearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (27 loc) · 879 Bytes
/
Makefile
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
# Needed SHELL since I'm using zsh
SHELL := /bin/bash
.PHONY: help
help: ## This help message
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
.PHONY: lint
lint: ### Lint project using clippy
cargo clippy --all-targets --all-features -- -D warnings
.PHONY: clean
clean: ### Clean up build artifacts
cargo clean
rm -rf wasm_output
.PHONY: build
build: ### Compile project
cargo build --features=bin
.PHONY: build-docker
build-docker: ### Build Docker image
docker build --progress=plain -t tinysearch/cli .
.PHONY: install
install: ## Install tinysearch
cargo install --force --path . --features=bin
.PHONY: test
test: ## Run unit tests
cargo test --features=bin
.PHONY: run
run: ## Run tinysearch with sample input
cargo run --features="bin" -- fixtures/index.json