2023-01-12 11:31:29 +01:00
|
|
|
BIN := cic-chain-events
|
2023-03-08 15:30:40 +01:00
|
|
|
BUILD_CONF := CGO_ENABLED=1 GOOS=linux GOARCH=amd64
|
|
|
|
BUILD_COMMIT := $(shell git rev-parse --short HEAD 2> /dev/null)
|
2023-01-12 11:31:29 +01:00
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
|
2023-03-08 15:30:40 +01:00
|
|
|
clean:
|
|
|
|
rm ${BIN}
|
|
|
|
|
2023-01-12 11:31:29 +01:00
|
|
|
build:
|
2023-03-08 15:30:40 +01:00
|
|
|
${BUILD_CONF} go build -ldflags="-X main.build=${BUILD_COMMIT} -s -w" -o ${BIN} cmd/service/*.go
|
2023-01-12 11:31:29 +01:00
|
|
|
|
|
|
|
run:
|
2023-03-08 15:30:40 +01:00
|
|
|
${BUILD_CONF} go run cmd/service/*
|
2023-01-14 11:17:34 +01:00
|
|
|
|
2023-03-08 15:30:40 +01:00
|
|
|
run-debug:
|
|
|
|
${BUILD_CONF} go run cmd/service/* -debug
|