Add continuous development pipeline
This commit is contained in:
23
Makefile
23
Makefile
@@ -10,12 +10,23 @@ MAIN_RS_SRCS := $(shell find src -type f -regex '^.*\.rs$$') Cargo.toml \
|
||||
|
||||
SEARCH_REPLACE := lib/search_and_replace/target/release/search_and_replace
|
||||
|
||||
DEV_DB := $(shell jq -r .dev.db config.json)
|
||||
DEV_BIND := $(shell jq -r .dev.bind_to config.json)
|
||||
PROD_DB := $(shell jq -r .prod.db config.json)
|
||||
PROD_SOCK_PATH := $(shell jq -r .prod.sock_path config.json)
|
||||
|
||||
.PHONY: run
|
||||
run: $(MAIN_RS_SRCS)
|
||||
DB_PATH="$$(jq -r .dev.db config.json)" \
|
||||
BIND_TO="$$(jq -r .dev.bind_to config.json)" \
|
||||
DB_PATH="$(DEV_DB)" \
|
||||
BIND_TO="$(DEV_BIND)" \
|
||||
cargo run --features dev
|
||||
|
||||
.PHONY: test
|
||||
test: target/release/zmp24
|
||||
DB_PATH="$(DEV_DB)" \
|
||||
BIND_TO="$(DEV_BIND)" \
|
||||
cargo test --release
|
||||
|
||||
.PHONY: clean
|
||||
clean: client_clean
|
||||
cargo clean
|
||||
@@ -29,13 +40,13 @@ include client/client.mk
|
||||
include image/image.mk
|
||||
|
||||
target/release/zmp24: $(MAIN_RS_SRCS)
|
||||
DB_PATH="$$(jq -r .prod.db config.json)" \
|
||||
BIND_TO="$$(jq -r .prod.sock_path config.json)" \
|
||||
DB_PATH="$(PROD_DB)" \
|
||||
BIND_TO="$(PROD_BIND)" \
|
||||
cargo build --release
|
||||
|
||||
target/$(ARCH)-unknown-linux-musl/release/zmp24: $(MAIN_RS_SRCS)
|
||||
DB_PATH="$$(jq -r .prod.db config.json)" \
|
||||
BIND_TO="$$(jq -r .prod.sock_path config.json)" \
|
||||
DB_PATH="$(PROD_DB)" \
|
||||
BIND_TO="$(PROD_BIND)" \
|
||||
cargo build --target $(ARCH)-unknown-linux-musl --release
|
||||
|
||||
$(SEARCH_REPLACE): lib/search_and_replace/src/main.rs lib/search_and_replace/Cargo.toml
|
||||
|
Reference in New Issue
Block a user