36 lines
703 B
Makefile
36 lines
703 B
Makefile
NAME=blt
|
|
VERSION=`git describe --tags`
|
|
|
|
# used for changing the output directory within docker containers
|
|
BUILD_DIR ?= .
|
|
|
|
dev-up:
|
|
docker compose -f docker-dev.yml up -d
|
|
|
|
dev-down:
|
|
docker compose -f docker-dev.yml down
|
|
|
|
dev-build:
|
|
docker compose -f docker-dev.yml build
|
|
|
|
build:
|
|
@echo "Building Go binary..."
|
|
@go build -o $(BUILD_DIR)/$(NAME) -ldflags "-X git.metaunix.net/bitgoblin/blt/app.AppVersion=$(VERSION)"
|
|
|
|
run:
|
|
$(BUILD_DIR)/$(NAME)
|
|
|
|
watch:
|
|
@echo "Starting hot-reload watcher..."
|
|
@air
|
|
|
|
.PHONY: help
|
|
all: help
|
|
# help: show this help message
|
|
help: Makefile
|
|
@echo
|
|
@echo " Choose a command to run in "$(APP_NAME)":"
|
|
@echo
|
|
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
|
|
@echo
|