Skip to content

Commit

Permalink
switch to go 1.11 modules
Browse files Browse the repository at this point in the history
  • Loading branch information
fstab committed Dec 27, 2018
1 parent 6457a0b commit a585b9c
Show file tree
Hide file tree
Showing 142 changed files with 18 additions and 39,903 deletions.
3 changes: 3 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ install:
build_script:
- cd c:\go\src\github.com\fstab\grok_exporter
- git submodule update --init --recursive
- set GO111MODULE=on
- go version
- go test github.com/fstab/grok_exporter
- go test github.com/fstab/grok_exporter/config
Expand All @@ -59,6 +60,8 @@ build_script:
- go test github.com/fstab/grok_exporter/exporter
- go test github.com/fstab/grok_exporter/oniguruma
- go test github.com/fstab/grok_exporter/tailer
- go test github.com/fstab/grok_exporter/tailer/fswatcher
- go test github.com/fstab/grok_exporter/tailer/glob
- go test github.com/fstab/grok_exporter/template
- go install github.com/fstab/grok_exporter
- C:\cygwin\bin\bash -c "cd /cygdrive/c/go/src/github.com/fstab/grok_exporter ; PATH='/usr/sbin:/usr/bin:/sbin:/bin' ./integration-test.sh"
Expand Down
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go

go:
- "1.10"
- "1.11"

os:
- linux
Expand Down Expand Up @@ -60,14 +60,15 @@ script:
else
LDD_COMMAND="ldd" ;
fi
export GO111MODULE=on ;
case "$MODE" in
"STATIC")
if [[ "$TRAVIS_OS_NAME" == "osx" ]] ;
then
sed -i.bak 's;#cgo LDFLAGS: -L/usr/local/lib -lonig;#cgo LDFLAGS: /usr/local/lib/libonig.a;' oniguruma/oniguruma.go ;
fi ;
CGO_LDFLAGS=/usr/local/lib/libonig.a go test -v $(go list ./... | grep -v /vendor/) ;
CGO_LDFLAGS=/usr/local/lib/libonig.a go install . ;
CGO_LDFLAGS=/usr/local/lib/libonig.a go test -count=1 -v ./... ;
CGO_LDFLAGS=/usr/local/lib/libonig.a go install ;
if $LDD_COMMAND $GOPATH/bin/grok_exporter | grep libonig ;
then
echo "ERROR: Expected statically linked binary." >&2 ;
Expand All @@ -76,8 +77,8 @@ script:
./integration-test.sh ;
;;
*)
go test -v $(go list ./... | grep -v /vendor/) ;
go install . ;
go test -count=1 -v ./... ;
go install ;
if ! $LDD_COMMAND $GOPATH/bin/grok_exporter | grep libonig ;
then
echo "ERROR: Expected dynamically linked binary." >&2 ;
Expand All @@ -91,10 +92,11 @@ after_success:
- |
set -e ;
set -x ;
export GO111MODULE=on ;
if [[ "$TRAVIS_OS_NAME" == "linux" && "$ONIG_VERSION" == "DEFAULT" ]] ;
then
go get golang.org/x/tools/cmd/cover github.com/mattn/goveralls github.com/modocache/gover ;
go list ./... | grep -v /vendor/ | while read package ;
go list ./... | while read package ;
do
go test -covermode count -coverprofile=$(basename $package).coverprofile $package ;
done ;
Expand Down
7 changes: 7 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module github.com/fstab/grok_exporter

require (
github.com/prometheus/client_golang v0.9.2
github.com/sirupsen/logrus v1.2.0
gopkg.in/yaml.v2 v2.2.2
)
20 changes: 0 additions & 20 deletions vendor/github.com/beorn7/perks/LICENSE

This file was deleted.

Loading

0 comments on commit a585b9c

Please sign in to comment.