-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
36 lines (26 loc) · 959 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
36
WORKSPACES="./" "./stream-delimit/"
DOCKER_IMAGE=docker.io/clux/muslrust
DOCKER_ARGS=run -v $(PWD):/volume:Z -w /volume -t $(DOCKER_IMAGE)
CARGO_TOKEN:=$(shell grep 'token' ~/.cargo/credentials.toml | cut -d'"' -f2)
all: debug
docker:
podman pull $(DOCKER_IMAGE)
debug: docker
podman $(DOCKER_ARGS) sh -c "cargo build --verbose"
release: docker
podman $(DOCKER_ARGS) sh -c "cargo build --verbose --release"
test: docker
podman $(DOCKER_ARGS) sh -c "cargo test --verbose"
publish: docker
podman $(DOCKER_ARGS) sh -c "cargo login $(CARGO_TOKEN) && cd stream-delimit && cargo publish ; cd ../ && cd erased-serde-json && cargo publish ; cd ../ && cargo publish"
fmt:
-cargo fmt --all
-black utils/*.py
clippy:
-cargo clippy --all
package: release
cd target/x86_64-unknown-linux-musl/release;\
tar -czvf pq-bin.tar.gz pq;\
cd -;\
mv target/x86_64-unknown-linux-musl/release/pq-bin.tar.gz ./pq-bin.tar.gz
.PHONY: all debug release package