Skip to content

Commit

Permalink
Update travis and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacia committed Aug 14, 2019
1 parent 1a08f59 commit cc15af9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
24 changes: 8 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
- 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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand All @@ -18,7 +18,7 @@ compile:
done

install:
go install .
env GO111MODULE=on go install .

uninstall:
go clean -i
env GO111MODULE=on go clean -i

0 comments on commit cc15af9

Please sign in to comment.