github.com/econnell/deis@v1.5.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  
    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  define echo_cyan
    31    @echo "\033[0;36m$(subst ",,$(1))\033[0m"
    32  endef
    33  
    34  define echo_yellow
    35    @echo "\033[0;33m$(subst ",,$(1))\033[0m"
    36  endef
    37  
    38  check-docker:
    39  	@if [ -z $$(which docker) ]; then \
    40  	  echo "Missing \`docker\` client which is required for development"; \
    41  	  exit 2; \
    42  	fi
    43  
    44  check-registry:
    45  	@if [ -z "$$DEV_REGISTRY" ]; then \
    46  	  echo "DEV_REGISTRY is not exported, try:  make dev-registry"; \
    47  	exit 2; \
    48  	fi
    49  
    50  check-deisctl:
    51  	@if [ -z $$(which deisctl) ]; then \
    52  	  echo "Missing \`deisctl\` utility, please install from https://github.com/deis/deis"; \
    53  	fi
    54  
    55  define check-static-binary
    56    if file $(1) | grep -q "statically linked"; then \
    57      echo -n ""; \
    58    else \
    59      echo "The binary file $(1) is not statically linked. Build canceled"; \
    60      exit 1; \
    61    fi
    62  endef
    63