diff --git a/.travis.yml b/.travis.yml index 27ad04e..f3d834f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ language: go sudo: false go: -- 1.11.x + - 1.12.x services: - docker install: - chmod 777 -R "$(pwd)" - - make dep script: + - travis_retry make dep - make lint - make test - make integration diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 2922e60..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,6 +0,0 @@ -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. - -[prune] - go-tests = true - unused-packages = true diff --git a/Makefile b/Makefile index c1cf289..edab789 100644 --- a/Makefile +++ b/Makefile @@ -1,39 +1,34 @@ TAG := $(shell git rev-parse --short HEAD) DIR := $(shell pwd -L) -GOPATH := ${GOPATH} -ifeq ($(GOPATH),) - GOPATH := ${HOME}/go -endif -PROJECT_PATH := $(subst $(GOPATH)/src/,,$(DIR)) dep: docker run -ti \ - --mount src="$(DIR)",target="/go/src/$(PROJECT_PATH)",type="bind" \ - -w "/go/src/$(PROJECT_PATH)" \ + --mount src="$(DIR)",target="$(DIR)",type="bind" \ + -w "$(DIR)" \ asecurityteam/sdcli:v1 go dep lint: docker run -ti \ - --mount src="$(DIR)",target="/go/src/$(PROJECT_PATH)",type="bind" \ - -w "/go/src/$(PROJECT_PATH)" \ + --mount src="$(DIR)",target="$(DIR)",type="bind" \ + -w "$(DIR)" \ asecurityteam/sdcli:v1 go lint test: docker run -ti \ - --mount src="$(DIR)",target="/go/src/$(PROJECT_PATH)",type="bind" \ - -w "/go/src/$(PROJECT_PATH)" \ + --mount src="$(DIR)",target="$(DIR)",type="bind" \ + -w "$(DIR)" \ asecurityteam/sdcli:v1 go test integration: docker run -ti \ - --mount src="$(DIR)",target="/go/src/$(PROJECT_PATH)",type="bind" \ - -w "/go/src/$(PROJECT_PATH)" \ + --mount src="$(DIR)",target="$(DIR)",type="bind" \ + -w "$(DIR)" \ asecurityteam/sdcli:v1 go integration coverage: docker run -ti \ - --mount src="$(DIR)",target="/go/src/$(PROJECT_PATH)",type="bind" \ - -w "/go/src/$(PROJECT_PATH)" \ + --mount src="$(DIR)",target="$(DIR)",type="bind" \ + -w "$(DIR)" \ asecurityteam/sdcli:v1 go coverage doc: ; diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..98b4cb1 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/asecurityteam/rolling + +go 1.12