AppFlowy/backend/Makefile

24 lines
494 B
Makefile
Raw Normal View History

2021-12-02 15:58:52 +08:00
ROOT = "./scripts"
2021-12-03 18:13:13 +08:00
SEMVER_VERSION=$(shell grep version Cargo.toml | awk -F"\"" '{print $$2}' | head -n 1)
2021-12-02 15:58:52 +08:00
2021-12-02 18:55:51 +08:00
.PHONY: init_database run_docker run_test
2021-12-01 16:44:58 +08:00
init_database:
2021-12-02 18:55:51 +08:00
POSTGRES_PORT=5433 ${ROOT}/init_database.sh
2021-12-02 18:55:51 +08:00
docker_image:
source $(ROOT)/docker_env.sh && docker-compose up -d db
source $(ROOT)/docker_env.sh && docker-compose up -d backend
2021-12-01 23:29:16 +08:00
2021-12-05 16:39:41 +08:00
local_server:
cargo run
2021-12-02 18:55:51 +08:00
docker_test:
sh $(ROOT)/docker_test.sh
2021-12-02 18:55:51 +08:00
local_test:
# 🔥 Must run init_database first
SQLX_OFFLINE=true cargo test