adding some build info

pull/8/head
Karolis Rusenas 2017-06-15 08:47:30 +01:00
parent c823c56b72
commit 7a8a9755c7
1 changed files with 15 additions and 4 deletions

View File

@ -1,5 +1,16 @@
build:
CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags -'w' -o keel .
JOBDATE ?= $(shell date -u +%Y-%m-%dT%H%M%SZ)
GIT_REVISION = $(shell git rev-parse --short HEAD)
VERSION ?= $(GIT_REVISION)
image: build
docker build -t karolisr/keel:0.1.2 -f Dockerfile .
LDFLAGS += -X github.com/rusenask/keel/version.Version=$(VERSION)
LDFLAGS += -X github.com/rusenask/keel/version.Revision=$(GIT_REVISION)
LDFLAGS += -X github.com/rusenask/keel/version.BuildDate=$(JOBDATE)
.PHONY: release
test:
go test -v `go list ./... | egrep -v /vendor/`
build:
@echo "++ Building keel"
CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags "$(LDFLAGS)" -o keel .