ingress-nginx-helm/controllers/nginx/Makefile

31 lines
750 B
Makefile
Raw Normal View History

2016-02-22 00:13:08 +00:00
all: push
# 0.0 shouldn't clobber any release builds
2016-06-18 19:39:50 +00:00
TAG = 0.8
2016-03-28 01:12:15 +00:00
PREFIX = gcr.io/google_containers/nginx-ingress-controller
2016-02-22 00:13:08 +00:00
2016-04-06 14:46:06 +00:00
REPO_INFO=$(shell git config --get remote.origin.url)
2016-06-18 19:39:50 +00:00
UPX:=$(shell command -v upx 2> /dev/null)
2016-04-06 14:46:06 +00:00
ifndef VERSION
VERSION := git-$(shell git rev-parse --short HEAD)
endif
2016-02-22 00:13:08 +00:00
controller: controller.go clean
2016-05-31 20:32:50 +00:00
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags \
"-s -w -X main.version=${VERSION} -X main.gitRepo=${REPO_INFO}" \
2016-04-06 14:46:06 +00:00
-o nginx-ingress-controller
2016-06-18 19:39:50 +00:00
ifdef UPX
# compressing the binary reduces the size at leat a 75%
upx nginx-ingress-controller
endif
2016-02-22 00:13:08 +00:00
container: controller
docker build -t $(PREFIX):$(TAG) .
push: container
gcloud docker push $(PREFIX):$(TAG)
clean:
2016-03-28 01:12:15 +00:00
rm -f nginx-ingress-controller