mirror of
https://github.com/mmatczuk/go-http-tunnel.git
synced 2026-05-15 14:16:17 -06:00
Removed megacheck, Added staticcheck
This commit is contained in:
parent
c17bb978e8
commit
db2c63a5f6
1 changed files with 29 additions and 29 deletions
58
Makefile
58
Makefile
|
|
@ -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:
|
||||
|
|
@ -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:
|
||||
|
|
@ -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
|
||||
@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
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue