forked from sevagh/pq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (25 loc) · 913 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
WORKSPACES="./" "./stream-delimit/"
DOCKER_ARGS=run -v $(PWD):/volume:Z -w /volume -t clux/muslrust
CARGO_TOKEN:=$(shell grep 'token' ~/.cargo/credentials | cut -d'"' -f2)
all: debug
docker:
podman pull clux/muslrust
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