Files
catapult/Makefile
T
phoenixandphoenix c47941acaf tsk-3: Create async loop (#4)
Closes #3

Reviewed-on: #4
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
2025-11-27 01:26:09 +00:00

23 lines
1013 B
Makefile

VERSION ?= $(shell git describe --tags 2>/dev/null || echo "dev")
COMMIT ?= $(shell git rev-parse --short HEAD)
BUILD_TIME ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
GO_VERSION ?= $(shell go version | awk '{print $$3}')
.PHONY: build
build:
go build -ldflags="\
-X 'git.kundeng.us/phoenix/catapult/internal/version.Version=$(VERSION)' \
-X 'git.kundeng.us/phoenix/catapult/internal/version.BuildTime=$(BUILD_TIME)' \
-X 'git.kundeng.us/phoenix/catapult/internal/version.Commit=$(COMMIT)' \
-X 'git.kundeng.us/phoenix/catapult/internal/version.GoVersion=$(GO_VERSION)'" \
-o catapult cmd/catapult/main.go
.PHONY: install
install:
go install -ldflags="\
-X 'git.kundeng.us/phoenix/catapult/internal/version.Version=$(VERSION)' \
-X 'git.kundeng.us/phoenix/catapult/internal/version.BuildTime=$(BUILD_TIME)' \
-X 'git.kundeng.us/phoenix/catapult/internal/version.Commit=$(COMMIT)' \
-X 'git.kundeng.us/phoenix/catapult/internal/version.GoVersion=$(GO_VERSION)'"
-o catapult cmd/catapult/main.go