Merge pull request #176 from govau/fixnogopath

Stop assuming that GOPATH is always set, and is a single directory
This commit is contained in:
Joel Speed 2019-06-03 16:21:39 +01:00 committed by GitHub
commit df6b6b7ce0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 11 deletions

View File

@ -6,10 +6,10 @@ install:
- wget -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
- chmod +x dep
- mv dep $GOPATH/bin/dep
- go get github.com/alecthomas/gometalinter
- gometalinter --install
script:
- ./configure
# Run tests
- make test
- ./configure && make test
sudo: false
notifications:
email: false

View File

@ -15,15 +15,8 @@ clean:
distclean: clean
rm -rf vendor
BIN_DIR := $(GOPATH)/bin
GOMETALINTER := $(BIN_DIR)/gometalinter
$(GOMETALINTER):
$(GO) get -u github.com/alecthomas/gometalinter
gometalinter --install %> /dev/null
.PHONY: lint
lint: $(GOMETALINTER)
lint:
$(GOMETALINTER) --vendor --disable-all \
--enable=vet \
--enable=vetshadow \

2
configure vendored
View File

@ -126,6 +126,7 @@ check_for go
check_go_version
check_go_env
check_for dep
check_for gometalinter
echo
@ -134,6 +135,7 @@ cat <<- EOF > .env
GO := "${tools[go]}"
GO_VERSION := ${tools[go_version]}
DEP := "${tools[dep]}"
GOMETALINTER := "${tools[gometalinter]}"
EOF
echo "Environment configuration written to .env"