|
|
@ -2,6 +2,9 @@ PWD := $(shell pwd) |
|
|
|
GOPATH := $(shell go env GOPATH)
|
|
|
|
GOPATH := $(shell go env GOPATH)
|
|
|
|
LDFLAGS := $(shell go run buildscripts/gen-ldflags.go)
|
|
|
|
LDFLAGS := $(shell go run buildscripts/gen-ldflags.go)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GOOS := $(shell go env GOOS)
|
|
|
|
|
|
|
|
GOOSALT := $(shell if [ ${GOOS} == 'darwin' ]; then echo 'mac'; else echo ${GOOS}; fi;)
|
|
|
|
|
|
|
|
|
|
|
|
TAG ?= $(USER)
|
|
|
|
TAG ?= $(USER)
|
|
|
|
BUILD_LDFLAGS := '$(LDFLAGS)'
|
|
|
|
BUILD_LDFLAGS := '$(LDFLAGS)'
|
|
|
|
|
|
|
|
|
|
|
@ -14,8 +17,8 @@ checks: |
|
|
|
getdeps: |
|
|
|
getdeps: |
|
|
|
@mkdir -p ${GOPATH}/bin
|
|
|
|
@mkdir -p ${GOPATH}/bin
|
|
|
|
@which golint 1>/dev/null || (echo "Installing golint" && go get -u golang.org/x/lint/golint)
|
|
|
|
@which golint 1>/dev/null || (echo "Installing golint" && go get -u golang.org/x/lint/golint)
|
|
|
|
@which staticcheck 1>/dev/null || (echo "Installing staticcheck" && wget --quiet -O ${GOPATH}/bin/staticcheck https://github.com/dominikh/go-tools/releases/download/2019.1/staticcheck_linux_amd64 && chmod +x ${GOPATH}/bin/staticcheck)
|
|
|
|
@which staticcheck 1>/dev/null || (echo "Installing staticcheck" && wget --quiet -O ${GOPATH}/bin/staticcheck https://github.com/dominikh/go-tools/releases/download/2019.1/staticcheck_${GOOS}_amd64 && chmod +x ${GOPATH}/bin/staticcheck)
|
|
|
|
@which misspell 1>/dev/null || (echo "Installing misspell" && wget --quiet https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_linux_64bit.tar.gz && tar xf misspell_0.3.4_linux_64bit.tar.gz && mv misspell ${GOPATH}/bin/misspell && chmod +x ${GOPATH}/bin/misspell && rm -f misspell_0.3.4_linux_64bit.tar.gz)
|
|
|
|
@which misspell 1>/dev/null || (echo "Installing misspell" && wget --quiet https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_${GOOSALT}_64bit.tar.gz && tar xf misspell_0.3.4_${GOOSALT}_64bit.tar.gz && mv misspell ${GOPATH}/bin/misspell && chmod +x ${GOPATH}/bin/misspell && rm -f misspell_0.3.4_${GOOSALT}_64bit.tar.gz)
|
|
|
|
|
|
|
|
|
|
|
|
crosscompile: |
|
|
|
crosscompile: |
|
|
|
@(env bash $(PWD)/buildscripts/cross-compile.sh)
|
|
|
|
@(env bash $(PWD)/buildscripts/cross-compile.sh)
|
|
|
|