Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: go
go:
- 1.x
- tip
script:
- make lint
Expand Down
41 changes: 28 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
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
go mod tidy

.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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package gitmock

const version = "0.0.0"