github.com/technosophos/deis@v1.7.1-0.20150915173815-f9005256004b/includes.mk (about) 1 SHELL = /bin/bash 2 3 GO = godep go 4 GOFMT = gofmt -l 5 GOLINT = golint 6 GOTEST = $(GO) test --cover --race -v 7 GOVET = $(GO) vet 8 9 SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST))) 10 DOCKER_HOST = $(shell echo $$DOCKER_HOST) 11 REGISTRY = $(shell if [ "$$DEV_REGISTRY" == "registry.hub.docker.com" ]; then echo; else echo $$DEV_REGISTRY/; fi) 12 GIT_SHA = $(shell git rev-parse --short HEAD) 13 14 ifndef IMAGE_PREFIX 15 IMAGE_PREFIX = deis/ 16 endif 17 18 ifndef BUILD_TAG 19 BUILD_TAG = git-$(GIT_SHA) 20 endif 21 22 ifndef S3_BUCKET 23 S3_BUCKET = deis-updates 24 endif 25 26 ifndef DEIS_NUM_INSTANCES 27 DEIS_NUM_INSTANCES = 3 28 endif 29 30 ifneq ($(DEIS_STATELESS), True) 31 STORE_IF_STATEFUL = store 32 endif 33 34 define echo_cyan 35 @echo "\033[0;36m$(subst ",,$(1))\033[0m" 36 endef 37 38 define echo_yellow 39 @echo "\033[0;33m$(subst ",,$(1))\033[0m" 40 endef 41 42 check-docker: 43 @if [ -z $$(which docker) ]; then \ 44 echo "Missing \`docker\` client which is required for development"; \ 45 exit 2; \ 46 fi 47 48 check-registry: 49 @if [ -z "$$DEV_REGISTRY" ]; then \ 50 echo "DEV_REGISTRY is not exported, try: make dev-registry"; \ 51 exit 2; \ 52 fi 53 54 check-deisctl: 55 @if [ -z $$(which deisctl) ]; then \ 56 echo "Missing \`deisctl\` utility, please install from https://github.com/deis/deis"; \ 57 fi 58 59 define check-static-binary 60 if file $(1) | egrep -q "(statically linked|Mach-O)"; then \ 61 echo -n ""; \ 62 else \ 63 echo "The binary file $(1) is not statically linked. Build canceled"; \ 64 exit 1; \ 65 fi 66 endef