Skip to content

Commit

Permalink
Removed megacheck, Added staticcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
antwal authored and mmatczuk committed Apr 15, 2019
1 parent 6f8da81 commit 109dd8f
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions Makefile
Expand Up @@ -9,7 +9,7 @@ fmt:
@go fmt ./...

.PHONY: check
check: .check-fmt .check-vet .check-lint .check-ineffassign .check-mega .check-misspell .check-vendor
check: .check-fmt .check-vet .check-lint .check-ineffassign .check-static .check-misspell .check-vendor

.PHONY: .check-fmt
.check-fmt:
Expand All @@ -35,8 +35,8 @@ check: .check-fmt .check-vet .check-lint .check-ineffassign .check-mega .check-m
@misspell ./...

.PHONY: .check-mega
.check-mega:
@megacheck ./...
.check-static:
@staticcheck ./...

.PHONY: .check-vendor
.check-vendor:
Expand All @@ -63,30 +63,30 @@ get-tools:
@go get -u github.com/gordonklaus/ineffassign
@go get -u github.com/mitchellh/gox
@go get -u github.com/tcnksm/ghr
@go get -u honnef.co/go/tools/cmd/megacheck

#OUTPUT_DIR = build
#OS = "darwin freebsd linux windows"
#ARCH = "386 amd64 arm"
#OSARCH = "!darwin/386 !darwin/arm !windows/arm"
#GIT_COMMIT = $(shell git describe --always)
#
#.PHONY: release
#release: check test clean build package
#
#.PHONY: build
#build:
# mkdir ${OUTPUT_DIR}
# CGO_ENABLED=0 GOARM=5 gox -ldflags "-w -X main.version=$(GIT_COMMIT)" \
# -os=${OS} -arch=${ARCH} -osarch=${OSARCH} -output "${OUTPUT_DIR}/pkg/{{.OS}}_{{.Arch}}/{{.Dir}}" \
# ./cmd/tunnel ./cmd/tunneld
#
#.PHONY: package
#package:
# mkdir ${OUTPUT_DIR}/dist
# cd ${OUTPUT_DIR}/pkg/; for osarch in *; do (cd $$osarch; tar zcvf ../../dist/tunnel_$$osarch.tar.gz ./*); done;
# cd ${OUTPUT_DIR}/dist; sha256sum * > ./SHA256SUMS
#
#.PHONY: publish
#publish:
# ghr -recreate -u mmatczuk -t ${GITHUB_TOKEN} -r go-http-tunnel pre-release ${OUTPUT_DIR}/dist
@go get -u honnef.co/go/tools/cmd/staticcheck

OUTPUT_DIR = build
OS = "darwin freebsd linux windows"
ARCH = "386 amd64 arm"
OSARCH = "!darwin/386 !darwin/arm !windows/arm"
GIT_COMMIT = $(shell git describe --always)

.PHONY: release
release: check test clean build package

.PHONY: build
build:
mkdir ${OUTPUT_DIR}
CGO_ENABLED=0 GOARM=5 gox -ldflags "-w -X main.version=$(GIT_COMMIT)" \
-os=${OS} -arch=${ARCH} -osarch=${OSARCH} -output "${OUTPUT_DIR}/pkg/{{.OS}}_{{.Arch}}/{{.Dir}}" \
./cmd/tunnel ./cmd/tunneld

.PHONY: package
package:
mkdir ${OUTPUT_DIR}/dist
cd ${OUTPUT_DIR}/pkg/; for osarch in *; do (cd $$osarch; tar zcvf ../../dist/tunnel_$$osarch.tar.gz ./*); done;
cd ${OUTPUT_DIR}/dist; sha256sum * > ./SHA256SUMS

.PHONY: publish
publish:
ghr -recreate -u mmatczuk -t ${GITHUB_TOKEN} -r go-http-tunnel pre-release ${OUTPUT_DIR}/dist

0 comments on commit 109dd8f

Please sign in to comment.