Skip to content

Commit

Permalink
intorduce Go Modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed May 7, 2019
1 parent fa197bc commit a4d302e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 13 deletions.
1 change: 1 addition & 0 deletions .travis.yml
@@ -1,5 +1,6 @@
language: go
go:
- 1.x
- tip
script:
- make lint
Expand Down
40 changes: 27 additions & 13 deletions Makefile
@@ -1,19 +1,33 @@
test: deps
go test
ifdef update
u=-u
endif

export GO111MODULE=on

.PHONY: deps
deps:
go get -d -v -t ./...
go get golang.org/x/lint/golint
go get github.com/mattn/goveralls
go get ${u} -d

.PHONY: devel-deps
devel-deps: deps
GO111MODULE=off go get ${u} \
golang.org/x/lint/golint \
github.com/mattn/goveralls \
github.com/Songmu/godzil/cmd/godzil

.PHONY: test
test: deps
go test

LINT_RET = .golint.txt
lint: deps
go vet ./...
rm -f $(LINT_RET)
golint ./... | tee $(LINT_RET)
test ! -s $(LINT_RET)
.PHONY: lint
lint: devel-deps
go vet
golint -set_exit_status

cover: deps
.PHONY: cover
cover: devel-deps
goveralls

.PHONY: test deps lint cover
.PHONY: release
release: devel-deps
godzil release
8 changes: 8 additions & 0 deletions go.mod
@@ -0,0 +1,8 @@
module github.com/Songmu/gitmock

go 1.12

require (
github.com/Masterminds/semver v1.4.2
github.com/pkg/errors v0.8.1
)
4 changes: 4 additions & 0 deletions go.sum
@@ -0,0 +1,4 @@
github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc=
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
3 changes: 3 additions & 0 deletions version.go
@@ -0,0 +1,3 @@
package gitmock

const version = "0.0.0"

0 comments on commit a4d302e

Please sign in to comment.