github.com/tmlbl/deis@v1.0.2/deisctl/Makefile (about)

     1  include ../includes.mk
     2  
     3  COMPONENT = deisctl
     4  IMAGE =  $(IMAGE_PREFIX)/$(COMPONENT):$(BUILD_TAG)
     5  
     6  build:
     7  	CGO_ENABLED=0 godep go build -a -ldflags '-s' .
     8  
     9  installer:
    10  	rm -rf dist && mkdir -p dist
    11  	CGO_ENABLED=0 godep go build -a -ldflags '-s' -o dist/deisctl .
    12  	@if [ ! -d makeself ]; then git clone -b single-binary https://github.com/deis/makeself.git; fi
    13  	PATH=./makeself:$$PATH BINARY=deisctl makeself.sh --bzip2 --current --nox11 dist \
    14  		dist/deisctl-`cat deis-version`-`go env GOOS`-`go env GOARCH`.run "Deis Control Utility" \
    15  		"./deisctl refresh-units \
    16  		&& echo \
    17  		&& echo '\033[0;36mdeisctl\033[0m is in the current directory and unit files are' \
    18  		&& echo 'in \$$HOME/.deis/units. Please move \033[0;36mdeisctl\033[0m to a' \
    19  		&& echo 'directory in your search PATH.' \
    20  		&& echo \
    21  		&& echo 'See http://docs.deis.io/ for documentation.' \
    22  		&& echo"
    23  
    24  install:
    25  	godep go install -v .
    26  
    27  setup-root-gotools:
    28  	sudo GOPATH=/tmp/tmpGOPATH go get -u -v code.google.com/p/go.tools/cmd/cover
    29  	sudo GOPATH=/tmp/tmpGOPATH go get -u -v code.google.com/p/go.tools/cmd/vet
    30  	sudo rm -rf /tmp/tmpGOPATH
    31  
    32  setup-gotools:
    33  	go get -v github.com/golang/lint/golint
    34  
    35  test-style:
    36  	go vet ./...
    37  	-golint ./...
    38  
    39  test: test-style
    40  	godep go test -v -cover ./...