From 398077ac6149e57d5326393535d5b977572de08f Mon Sep 17 00:00:00 2001 From: Gosuke Miyashita Date: Tue, 10 Apr 2018 16:43:16 +0900 Subject: [PATCH 1/2] Use vgo instead of glide --- Makefile | 26 +++++++++++--------------- appengine/app/Makefile | 4 ++-- glide.lock | 10 ---------- glide.yaml | 7 ------- go.mod | 6 ++++++ 5 files changed, 19 insertions(+), 34 deletions(-) delete mode 100644 glide.lock delete mode 100644 glide.yaml create mode 100644 go.mod diff --git a/Makefile b/Makefile index bf18a1d..735d2aa 100644 --- a/Makefile +++ b/Makefile @@ -3,29 +3,25 @@ NAME := nolmandy all: build setup: - go get github.com/Masterminds/glide + go get golang.org/x/vgo go get github.com/golang/lint/golint go get golang.org/x/tools/cmd/goimports -deps: setup - glide install - -test: deps lint - go test $$(glide novendor | grep -v cmd) - go test -race $$(glide novendor | grep -v cmd) +test: lint + vgo test ./... + vgo test -race ./... lint: setup - go vet $$(glide novendor | grep -v cmd) - for pkg in $$(glide novendor -x); do \ - golint -set_exit_status $$pkg || exit $$?; \ - done + vgo vet ./... + golint ./... fmt: setup - goimports -w $$(glide nv -x) + goimports -w . -build: deps - go build -o bin/$(NAME) cmd/nolmandy/nolmandy.go - go build -o bin/$(NAME)-server cmd/nolmandy/nolmandy_server.go +build: + vgo build -o bin/$(NAME) cmd/nolmandy/nolmandy.go + vgo build -o bin/$(NAME)-server cmd/nolmandy/nolmandy_server.go clean: rm bin/$(NAME) + diff --git a/appengine/app/Makefile b/appengine/app/Makefile index 1653f3e..d8d3fce 100644 --- a/appengine/app/Makefile +++ b/appengine/app/Makefile @@ -1,10 +1,10 @@ setup: - go get github.com/Masterminds/glide + go get golang.org/x/vgo go get github.com/golang/lint/golint go get golang.org/x/tools/cmd/goimports deps: setup - cd ../.. && glide install + cd ../.. && vgo vendor deploy: deps GOPATH=../_gopath:../_gopath/vendor gcloud app deploy diff --git a/glide.lock b/glide.lock deleted file mode 100644 index e6be349..0000000 --- a/glide.lock +++ /dev/null @@ -1,10 +0,0 @@ -hash: 7cf3277bb6b995280bfd9a0cfb4a42d93171832ce8fdeb0b642f0130df56ecfb -updated: 2018-03-05T13:57:18.154677897+09:00 -imports: -- name: github.com/fullsailor/pkcs7 - version: 1d5002593acb237433a98512c6343587b03ebe5d -- name: github.com/rakyll/statik - version: fd36b3595eb2ec8da4b8153b107f7ea08504899d - subpackages: - - fs -testImports: [] diff --git a/glide.yaml b/glide.yaml deleted file mode 100644 index 34d7c41..0000000 --- a/glide.yaml +++ /dev/null @@ -1,7 +0,0 @@ -package: github.com/aktsk/nolmandy -import: -- package: github.com/fullsailor/pkcs7 -- package: github.com/rakyll/statik - version: ~0.1.1 - subpackages: - - fs diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..6dc895b --- /dev/null +++ b/go.mod @@ -0,0 +1,6 @@ +module "github.com/aktsk/nolmandy" + +require ( + "github.com/fullsailor/pkcs7" v0.0.0-20180223002317-1d5002593acb + "github.com/rakyll/statik" v0.1.1 +) From 5ad0b751e1b5449ab63ed0b4a38144f215a78ad6 Mon Sep 17 00:00:00 2001 From: Gosuke Miyashita Date: Tue, 10 Apr 2018 17:16:05 +0900 Subject: [PATCH 2/2] Make .netrc in travis environment to avoid 403 response from api.github.com Ref https://github.com/golang/go/issues/24085 --- .travis.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5abfa47..9b11885 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,15 @@ language: go +before_script: + - echo "machine api.github.com login mizzy password $GITHUB_ACCESS_TOKEN" > ~/.netrc + script: - make test go: - - "1.10.x" + - 1.10.x - master + +env: + global: + secure: ZpLtLnnbx+oDZqLbGgbQYrZtTzwFwpouwekAslh83HVoVPIaYzi9fmSIJFOxN3sMOS5zQCbq7mOlB+r8hPmjdlr8PAPeTnGlCHUUFA7BTlVT39fy5s+HsICF+gq16DM+1TWu3udGBmgt3gvWhPp/+9GJklAa5d76J8idd68brBL2fIUxvBjZ9ReqM8KOAeIE3XuzLeGNO9CWtmpDDf4o83Dsd00eavxy8gf9BR0WQxlKG5xtNxUg/sFu18An/Y/JaQYIfkGemwnerD6B/cb+mYVh/zs18kkNfEPxy8chM0/ABrz85P9OQfRp2hgkPWA0Zxf+YvKMYYhTsYSTlqBYRWam6wyZ2NdzWO+YvZ5O1eD00GhFaIjVa5Z6jJRwCIYvnSDCMAovdxWJakQpl3O5/XY2R4M3X50H3ENRvg/si2w1AqS6CAj/KOVlMFR9GX+1pCtowqo41kRT8PcdwXg6lnFXbTDjpC2rWhtFrlTVt3vJP1QQ0qGsY2kWPxksT4wd8yaNW1UBtens0iSyYbJKVlQ11zf4nol88exqnEPDovyHQx+Y0A91KvalozxCTFEYsBAC0HbZugNwZwRg8aDxsWmPSQXBc0IbCsfHPdI7bnINTSrYrLVGgqp1xgHNuoIJms6ZV/bJ2N6T63wR5Hek25adTb1lsuc7BHVk3l+6Ulo=