diff --git a/.travis.yml b/.travis.yml index e3d3c5f..e0c5dd8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,21 @@ language: go go: - - "1.9.7" - - "1.10.4" - - "1.11.5" + - "1.12.7" sudo: false -before_install: - - >- - curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 - -o $GOPATH/bin/dep - - chmod +x $GOPATH/bin/dep - - go get gopkg.in/alecthomas/gometalinter.v2 - - gometalinter.v2 --install +env: + - GO111MODULE=on install: - - dep ensure - - go install . ./cmd/... + - env GO111MODULE=on go build script: - export PATH=$PATH:$HOME/gopath/bin after_script: - - if [ "$TRAVIS_GO_VERSION" = "1.11.5" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/inconshreveable/mousetrap; fi - - if [ "$TRAVIS_GO_VERSION" = "1.11.5" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/mitchellh/gox; fi - - if [ "$TRAVIS_GO_VERSION" = "1.11.5" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/tcnksm/ghr; fi - - if [ "$TRAVIS_GO_VERSION" = "1.11.5" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then make compile; ghr --username gcash --token $GITHUB_TOKEN --replace $TRAVIS_TAG pkg/; fi \ No newline at end of file + - if [ "$TRAVIS_GO_VERSION" = "1.12.7" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/inconshreveable/mousetrap; fi + - if [ "$TRAVIS_GO_VERSION" = "1.12.7" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/mitchellh/gox; fi + - if [ "$TRAVIS_GO_VERSION" = "1.12.7" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/tcnksm/ghr; fi + - if [ "$TRAVIS_GO_VERSION" = "1.12.7" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then make compile; ghr --username gcash --token $GITHUB_TOKEN --replace $TRAVIS_TAG pkg/; fi \ No newline at end of file diff --git a/Makefile b/Makefile index 50de80b..d4a17a2 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ OSARCH ?= darwin/386 darwin/amd64 dragonfly/amd64 freebsd/386 freebsd/amd64 free DIRS ?= darwin_386 darwin_amd64 dragonfly_amd64 freebsd_386 freebsd_amd64 freebsd_arm linux_386 linux_amd64 linux_arm netbsd_386 netbsd_amd64 netbsd_arm openbsd_386 openbsd_amd64 windows_386 windows_amd64 all: - go build . + env GO111MODULE=on go build . compile: gox -osarch="$(OSARCH)" -output "$(OUTDIR)/$(APPNAME)-{{.OS}}_{{.Arch}}/$(APPNAME)" @@ -18,7 +18,7 @@ compile: done install: - go install . + env GO111MODULE=on go install . uninstall: - go clean -i + env GO111MODULE=on go clean -i