# Build settings
################

APP_NAME = cert-manager
VCS_URL ?=$(shell git config --get remote.origin.url)
IMAGE_NAME =$(PROJECT)
IMAGE_DISPLAY_NAME =Certificate Manager $(PROJECT)
ARCH = $(shell uname -m)
ifeq ($(ARCH), x86_64)
	ARCH = amd64
	IMAGE_NAME_ARCH =$(IMAGE_NAME)-amd64
else
	IMAGE_NAME_ARCH =$(IMAGE_NAME)-$(ARCH)
endif
GOARCH = $(shell go env GOARCH)
GOOS = $(shell go env GOOS)
IMAGE_MAINTAINER =gparvin@us.ibm.com
IMAGE_VENDOR =IBM
IMAGE_VERSION :=$(shell git rev-parse --short HEAD)
IMAGE_DESCRIPTION =Certificate Manager $(PROJECT)
IMAGE_SUMMARY =$(IMAGE_DESCRIPTION)
IMAGE_OPENSHIFT_TAGS =Certificate Manager $(PROJECT)

DOCKER_BUILD_PATH = hack/build/dockerfiles/$(PROJECT)
DOCKER_BUILD_OPTS=--build-arg "VCS_REF=$(SEMVERSION)" \
	--build-arg "GOARCH=$(GOARCH)" \
	--build-arg "VCS_URL=$(VCS_URL)" \
	--build-arg "IMAGE_NAME=$(IMAGE_NAME)" \
	--build-arg "IMAGE_DISPLAY_NAME=$(IMAGE_DISPLAY_NAME)" \
	--build-arg "IMAGE_NAME_ARCH=$(IMAGE_NAME_ARCH)" \
	--build-arg "IMAGE_MAINTAINER=$(IMAGE_MAINTAINER)" \
	--build-arg "IMAGE_VENDOR=$(IMAGE_VENDOR)" \
	--build-arg "IMAGE_VERSION=$(IMAGE_VERSION)" \
	--build-arg "IMAGE_DESCRIPTION=$(IMAGE_DESCRIPTION)" \
	--build-arg "IMAGE_SUMMARY=$(IMAGE_SUMMARY)" \
	--build-arg "IMAGE_OPENSHIFT_TAGS=$(IMAGE_OPENSHIFT_TAGS)"

# Path to dockerfiles directory-- check if can use $HOME for it?
DOCKERFILES ?= /home/travis/gopath/src/github.com/jetstack/cert-manager/hack/build/dockerfiles

