helm-import/Makefile

20 lines
399 B
Makefile

BUILD=`date +%FT%T%z`
LDFLAGS=-ldflags "-X main.buildDate=${BUILD}"
LDFLAGS_STATIC=-ldflags "-s -X main.buildDate=${BUILD}"
.PHONY: deps build dist
test:
go test git.martyn.berlin/martyn/helm-import/cmd
build:
go build cmd ${LDFLAGS}
deps:
GO111MODULE=on go mod download
dist:
mkdir -p bin || true
cd cmd && go build ${LDFLAGS_STATIC} -installsuffix cgo -o ../bin/helm-import-linux-x64 .