2023-03-08 15:19:33 +01:00
|
|
|
BIN := cic-custodial
|
|
|
|
BUILD_CONF := CGO_ENABLED=1 GOOS=linux GOARCH=amd64
|
|
|
|
BUILD_COMMIT := $(shell git rev-parse --short HEAD 2> /dev/null)
|
|
|
|
|
2023-04-13 13:55:07 +02:00
|
|
|
.PHONY: build run run-debug docs
|
2023-03-08 15:19:33 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm ${BIN}
|
|
|
|
|
|
|
|
build:
|
|
|
|
${BUILD_CONF} go build -ldflags="-X main.build=${BUILD_COMMIT} -s -w" -o ${BIN} cmd/service/*
|
|
|
|
|
2023-04-13 13:55:07 +02:00
|
|
|
docs:
|
2023-04-14 09:56:21 +02:00
|
|
|
swag fmt --dir internal/api/
|
2023-04-13 13:55:07 +02:00
|
|
|
swag init --dir internal/api/ -g swagger.go
|
|
|
|
|
2023-03-08 15:19:33 +01:00
|
|
|
run:
|
|
|
|
${BUILD_CONF} go run cmd/service/*
|
|
|
|
|
|
|
|
run-debug:
|
|
|
|
${BUILD_CONF} go run cmd/service/* -debug
|