Merge pull request #176 from govau/fixnogopath
Stop assuming that GOPATH is always set, and is a single directory
This commit is contained in:
commit
df6b6b7ce0
@ -6,10 +6,10 @@ install:
|
|||||||
- wget -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
|
- wget -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
|
||||||
- chmod +x dep
|
- chmod +x dep
|
||||||
- mv dep $GOPATH/bin/dep
|
- mv dep $GOPATH/bin/dep
|
||||||
|
- go get github.com/alecthomas/gometalinter
|
||||||
|
- gometalinter --install
|
||||||
script:
|
script:
|
||||||
- ./configure
|
- ./configure && make test
|
||||||
# Run tests
|
|
||||||
- make test
|
|
||||||
sudo: false
|
sudo: false
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
9
Makefile
9
Makefile
@ -15,15 +15,8 @@ clean:
|
|||||||
distclean: clean
|
distclean: clean
|
||||||
rm -rf vendor
|
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
|
.PHONY: lint
|
||||||
lint: $(GOMETALINTER)
|
lint:
|
||||||
$(GOMETALINTER) --vendor --disable-all \
|
$(GOMETALINTER) --vendor --disable-all \
|
||||||
--enable=vet \
|
--enable=vet \
|
||||||
--enable=vetshadow \
|
--enable=vetshadow \
|
||||||
|
2
configure
vendored
2
configure
vendored
@ -126,6 +126,7 @@ check_for go
|
|||||||
check_go_version
|
check_go_version
|
||||||
check_go_env
|
check_go_env
|
||||||
check_for dep
|
check_for dep
|
||||||
|
check_for gometalinter
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@ -134,6 +135,7 @@ cat <<- EOF > .env
|
|||||||
GO := "${tools[go]}"
|
GO := "${tools[go]}"
|
||||||
GO_VERSION := ${tools[go_version]}
|
GO_VERSION := ${tools[go_version]}
|
||||||
DEP := "${tools[dep]}"
|
DEP := "${tools[dep]}"
|
||||||
|
GOMETALINTER := "${tools[gometalinter]}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "Environment configuration written to .env"
|
echo "Environment configuration written to .env"
|
||||||
|
Loading…
Reference in New Issue
Block a user