keel/Makefile

28 lines
844 B
Makefile
Raw Normal View History

2017-06-15 07:47:30 +00:00
JOBDATE ?= $(shell date -u +%Y-%m-%dT%H%M%SZ)
GIT_REVISION = $(shell git rev-parse --short HEAD)
2017-07-22 20:40:54 +00:00
VERSION ?= $(shell git describe --tags --abbrev=0)
2017-06-15 07:47:30 +00:00
2017-11-01 18:25:28 +00:00
LDFLAGS += -X github.com/keel-hq/keel/version.Version=$(VERSION)
LDFLAGS += -X github.com/keel-hq/keel/version.Revision=$(GIT_REVISION)
LDFLAGS += -X github.com/keel-hq/keel/version.BuildDate=$(JOBDATE)
2017-06-15 07:47:30 +00:00
.PHONY: release
2017-06-10 11:24:03 +00:00
2017-06-15 07:47:30 +00:00
test:
go test -v `go list ./... | egrep -v /vendor/`
build:
@echo "++ Building keel"
2017-12-12 22:19:44 +00:00
CGO_ENABLED=0 GOOS=linux cd cmd/keel && go build -a -tags netgo -ldflags "$(LDFLAGS) -w -s" -o keel .
install:
@echo "++ Installing keel"
2017-12-12 00:04:52 +00:00
CGO_ENABLED=0 GOOS=linux go install -ldflags "$(LDFLAGS) -w -s" github.com/keel-hq/keel/cmd/keel
image:
docker build -t karolisr/keel:alpha -f Dockerfile .
alpha: image
@echo "++ Pushing keel alpha"
docker push karolisr/keel:alpha