github.com/rvaralda/deis@v1.4.1/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 echo $$DEV_REGISTRY)
    12  GIT_SHA = $(shell git rev-parse --short HEAD)
    13  IMAGE_PREFIX := deis/
    14  
    15  ifndef BUILD_TAG
    16    BUILD_TAG = git-$(GIT_SHA)
    17  endif
    18  
    19  ifndef S3_BUCKET
    20    S3_BUCKET = deis-updates
    21  endif
    22  
    23  ifndef DEIS_NUM_INSTANCES
    24    DEIS_NUM_INSTANCES = 3
    25  endif
    26  
    27  define echo_cyan
    28    @echo "\033[0;36m$(subst ",,$(1))\033[0m"
    29  endef
    30  
    31  define echo_yellow
    32    @echo "\033[0;33m$(subst ",,$(1))\033[0m"
    33  endef
    34  
    35  check-docker:
    36  	@if [ -z $$(which docker) ]; then \
    37  	  echo "Missing \`docker\` client which is required for development"; \
    38  	  exit 2; \
    39  	fi
    40  
    41  check-registry:
    42  	@if [ -z "$$DEV_REGISTRY" ]; then \
    43  	  echo "DEV_REGISTRY is not exported, try:  make dev-registry"; \
    44  	exit 2; \
    45  	fi
    46  
    47  check-deisctl:
    48  	@if [ -z $$(which deisctl) ]; then \
    49  	  echo "Missing \`deisctl\` utility, please install from https://github.com/deis/deis"; \
    50  	fi