This repository was archived by the owner on Sep 18, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11export CGO_ENABLED: =0
22
3- VERSION =$(shell ./ git-version )
4- LD_FLAGS ="-w -X github.com/coreos/container-linux-config-transpiler/version.Raw=$(VERSION ) "
3+ VERSION =$(shell git describe --dirty )
4+ LD_FLAGS ="-w -X github.com/coreos/container-linux-config-transpiler/internal/ version.Raw=$(VERSION ) "
55
66REPO =github.com/coreos/container-linux-config-transpiler
77
Load diff This file was deleted.
Original file line number Diff line number Diff line change 22
33set -eu
44
5- source ./build
5+ ORG_PATH=" github.com/coreos"
6+ REPO_PATH=" ${ORG_PATH} /container-linux-config-transpiler"
7+
8+ if [ ! -h gopath/src/${REPO_PATH} ]; then
9+ mkdir -p gopath/src/${ORG_PATH}
10+ ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
11+ fi
12+
13+ export GOPATH=${PWD} /gopath
614
715SRC=$( find . -name ' *.go' \
816 -not -path " ./vendor/*" )
917
10- PKG=$( cd gopath/src/${REPO_PATH} ; go list ./... | \
11- grep --invert-match vendor)
12-
13- # https://github.com/golang/go/issues/15067
14- PKG_VET=$( cd gopath/src/${REPO_PATH} ; go list ./... | \
15- grep --invert-match vendor | \
16- grep --invert-match internal/log)
18+ PKGS=$( cd gopath/src/${REPO_PATH} ; go list ./... | \
19+ grep --invert-match /vendor)
20+ FORMATTABLE=$( cd gopath/src/${REPO_PATH} ; ls -d * / | \
21+ grep --invert-match --extended-regexp ' (vendor/)' )
1722
1823echo " Checking gofix..."
1924go tool fix -diff $SRC
2025
2126echo " Checking gofmt..."
22- res =$( gofmt -d -e -s $SRC )
23- echo " ${res} "
24- if [ -n " ${res} " ] ; then
25- exit 1
27+ fmtRes =$( gofmt -l $FORMATTABLE )
28+ if [ -n " ${fmtRes} " ] ; then
29+ echo -e " gofmt checking failed:\n ${fmtRes} "
30+ exit 2
2631fi
2732
2833echo " Checking govet..."
29- go vet $PKG_VET
34+ go vet $PKGS
3035
3136echo " Running tests..."
32- go test -timeout 60s -cover $@ ${PKG}
37+ go test $PKGS -cover
3338
3439echo " Checking documentation..."
3540go run internal/util/tools/docs.go
You can’t perform that action at this time.
0 commit comments