Skip to content

Commit

Permalink
Merge pull request #60 from jensneuse/migrate-to-go-mod
Browse files Browse the repository at this point in the history
Migrate to go modules / golangci-lint
  • Loading branch information
jensneuse authored Apr 7, 2019
2 parents 99d4d14 + 5045f99 commit 41284b8
Show file tree
Hide file tree
Showing 681 changed files with 299 additions and 315,756 deletions.
14 changes: 5 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ version: 2
jobs:
test:
docker:
- image: circleci/golang:1.11
working_directory: /go/src/github.com/jensneuse/graphql-go-tools
- image: circleci/golang:1.12
steps:
- checkout
- run: go get -u github.com/alecthomas/gometalinter
- run: gometalinter --install
- run: gometalinter --config ./gometalinter.json ./pkg/**
- run: go test ./...
- run: make bootstrap
- run: make ci
release:
docker:
- image: circleci/golang:1.11
working_directory: /go/src/github.com/jensneuse/graphql-go-tools
- image: circleci/golang:1.12
steps:
- checkout
- run: curl -sL https://git.io/goreleaser | bash
Expand All @@ -27,4 +23,4 @@ workflows:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
284 changes: 0 additions & 284 deletions Gopkg.lock

This file was deleted.

33 changes: 0 additions & 33 deletions Gopkg.toml

This file was deleted.

22 changes: 8 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
GOLANG_CI_VERSION = "v1.16.0"
HAS_GOLANG_CI_LINT := $(shell command -v golangci-lint;)

.PHONY: test
test:
go test ./...
Expand All @@ -9,7 +12,7 @@ updateTestFixtures:

.PHONY: lint
lint:
gometalinter --config ./gometalinter.json ./pkg/**
golangci-lint run

.PHONY: format
format:
Expand All @@ -18,9 +21,8 @@ format:
.PHONY: prepare-merge
prepare-merge: format test lint

HAS_GOMETALINTER := $(shell command -v gometalinter;)
HAS_DEP := $(shell command -v dep;)
HAS_GIT := $(shell command -v git;)
.PHONY: ci
ci: test lint

.PHONY: generate
generate: $(GOPATH)/bin/go-enum $(GOPATH)/bin/mockgen $(GOPATH)/bin/stringer
Expand All @@ -40,14 +42,6 @@ $(GOPATH)/bin/stringer:

.PHONY: bootstrap
bootstrap:
ifndef HAS_GIT
$(error You must install git)
endif
ifndef HAS_DEP
go get -u github.com/golang/dep/cmd/dep
endif
ifndef HAS_GOMETALINTER
go get -u github.com/alecthomas/gometalinter
gometalinter --install
ifndef HAS_GOLANG_CI_LINT
go get github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANG_CI_VERSION}
endif
dep ensure
Loading

0 comments on commit 41284b8

Please sign in to comment.