Skip to content

Commit

Permalink
Merge pull request #6 from asecurityteam/go-mod-migration
Browse files Browse the repository at this point in the history
Migrating repo from dep to go modules
  • Loading branch information
aslape committed Aug 13, 2019
2 parents c63ea48 + c483a1f commit cca7aa2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .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
Expand Down
6 changes: 0 additions & 6 deletions Gopkg.toml

This file was deleted.

25 changes: 10 additions & 15 deletions 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: ;
Expand Down
3 changes: 3 additions & 0 deletions go.mod
@@ -0,0 +1,3 @@
module github.com/asecurityteam/rolling

go 1.12

0 comments on commit cca7aa2

Please sign in to comment.