SHELL:=/bin/sh
.PHONY: all
VERSION = $(patsubst "%",%, $(word 3, $(shell grep version Cargo.toml)))
BUILD_TIME = $(shell date +"%Y/%m/%d %H:%M:%S")
GIT_REVISION = $(shell git log -1 --format="%h")
BINARY_NAME = iproxy
help:
@awk 'BEGIN {FS = ":.*?## "; printf "Usage:\n make \033[36m<target> \033[0m\n\nTargets:\n"} /^[a-zA-Z0-9_-]+:.*?## / {gsub("\\\\n",sprintf("\n%22c",""), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
mtoc:
mtoc
pre-commit:
pre-commit run -a
run:
cargo run
package:
zip -j ${BINARY_NAME}-$(ARCH).zip target/$(TARGET)/release/${BINARY_NAME}
git-cliff:
git cliff --output CHANGELOG.md
autoreload:
systemfd --no-pid -s http::3000 -- cargo watch -w src -x run
container-build:
docker build -t ${BINARY_NAME}:latest .
create-iproxy-network:
docker network create iproxy
compose-up-build:
docker-compose -f compose.yml up -d --build --force-recreate
compose-up:
docker-compose -f compose.yml up -d --force-recreate
compose-down:
docker-compose -f compose.yml down
local-development:
docker-compose -f local.compose.yml up -d --force-recreate ;\
CONFIG_FILE_PATH=./local.config.toml systemfd --no-pid -s http::3000 -- cargo watch -w src -x run
local-development-down:
docker-compose -f local.compose.yml down
podman-up:
podman-compose -f compose.yml up -d
podman-down:
podman-compose -f compose.yml down