timestamp = $(shell date +'%Y-%m-%d-%H-%M-%S')
branch = $(shell git rev-parse --abbrev-ref HEAD)
commitid = $(shell git rev-parse HEAD)
tag = $(branch)-$(commitid)
image = registry.gitlab.com/devara.world/health-app:$(tag)
image_latest = registry.gitlab.com/devara.world/health-app:latest
curdir = $(shell pwd)
export PROFILE ?= dev
help:
@echo
@echo *surfer*
@echo
@echo "--- TARGETS ---"
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
@echo "------"
@echo
clean:
./scripts/clean.sh
c: clean
fmt:
./scripts/fmt.sh
f: fmt
test: fmt
./scripts/test.sh
t: test
build:
./scripts/build.sh
b: build
release: private PROFILE = release
release: build
r: release
run: fmt
cargo run
doc: release
cargo doc
deploy:
docker-compose up -d
docker_clean:
docker system prune --all --force
docker_build:
docker build -t $(image) .
docker build -t $(image_latest) .
docker_push: docker_build
docker push $(image)
docker push $(image_latest)
init:
rustup target add x86_64-unknown-linux-musl
cargo install cargo-chef
rustup update
rustup component add clippy
rustup component add rustfmt
rustup component add rust-analysis rust-src
debug:
echo "image: $(image)"