forked from keel-hq/keel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (20 loc) · 844 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
JOBDATE ?= $(shell date -u +%Y-%m-%dT%H%M%SZ)
GIT_REVISION = $(shell git rev-parse --short HEAD)
VERSION ?= $(shell git describe --tags --abbrev=0)
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)
.PHONY: release
test:
go test -v `go list ./... | egrep -v /vendor/`
build:
@echo "++ Building keel"
CGO_ENABLED=0 GOOS=linux cd cmd/keel && go build -a -tags netgo -ldflags "$(LDFLAGS) -w -s" -o keel .
install:
@echo "++ Installing keel"
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