Skip to content

Commit 5f89169

Browse files
authored
Merge pull request #9 from displague/feature/gomod
switch from dep to go mod
2 parents fcb5a5c + 1bf02e7 commit 5f89169

File tree

8 files changed

+122
-271
lines changed

8 files changed

+122
-271
lines changed

.circleci/config.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,23 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/golang:1.10
5+
- image: circleci/golang:1.11
66
working_directory: /go/src/github.com/linode/docker-machine-driver-linode
77
steps:
88
- checkout
9-
- run:
10-
name: Install tools
11-
command: |
12-
curl -L https://github.com/golang/dep/raw/master/install.sh | sh
13-
- run:
14-
name: Install dependencies
15-
command: dep ensure
169
- run:
1710
name: Build binary
1811
command: make
1912
release:
2013
docker:
21-
- image: circleci/golang:1.10
14+
- image: circleci/golang:1.11
2215
working_directory: /go/src/github.com/linode/docker-machine-driver-linode
2316
steps:
2417
- checkout
2518
- run:
2619
name: Install tools
2720
command: |
28-
curl -L https://github.com/golang/dep/raw/master/install.sh | sh
2921
go get github.com/goreleaser/goreleaser
30-
- run:
31-
name: Install dependencies
32-
command: dep ensure
3322
- run:
3423
name: Run goreleaser
3524
command: goreleaser

.goreleaser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ builds:
44
-
55
env:
66
- CGO_ENABLED=0
7+
- GO111MODULE=on
78
binary: docker-machine-driver-linode
89
goos:
910
- windows

Gopkg.lock

Lines changed: 0 additions & 208 deletions
This file was deleted.

Gopkg.toml

Lines changed: 0 additions & 42 deletions
This file was deleted.

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,24 @@ PROG := docker-machine-driver-linode
44
GOOS ?= $(shell go env GOOS)
55
GOARCH ?= $(shell go env GOARCH)
66

7+
GO111MODULE=on
8+
79
ifeq ($(GOOS),windows)
810
BIN_SUFFIX := ".exe"
911
endif
1012

1113
.PHONY: build
12-
build:
14+
build: dep
1315
go build -o $(OUT_DIR)/$(PROG)$(BIN_SUFFIX) ./
1416

1517
.PHONY: dep
1618
dep:
17-
dep ensure
19+
@GO111MODULE=on
20+
go get -d ./
21+
go mod verify
1822

1923
.PHONY: test
20-
test:
24+
test: dep
2125
go test -race ./...
2226

2327
.PHONY: check
@@ -34,5 +38,5 @@ uninstall:
3438
$(RM) $(GOPATH)/bin/$(PROG)$(BIN_SUFFIX)
3539

3640
.PHONY: install
37-
install:
41+
install: build
3842
go install

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,36 @@
11
# docker-machine-driver-linode
22

3+
[![GoDoc](https://godoc.org/github.com/linode/docker-machine-driver-linode?status.svg)](https://godoc.org/github.com/linode/docker-machine-driver-linode)
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/linode/docker-machine-driver-linode)](https://goreportcard.com/report/github.com/linode/docker-machine-driver-linode)
5+
[![CircleCI](https://circleci.com/gh/linode/docker-machine-driver-linode.svg?style=svg)](https://circleci.com/gh/linode/docker-machine-driver-linode)
6+
[![GitHub release](https://img.shields.io/github/release/linode/docker-machine-driver-linode.svg)](https://github.com/linode/docker-machine-driver-linode/releases/)
7+
38
Linode Driver Plugin for docker-machine.
49

510
## Install
611

7-
First, docker-machine is required, documentation for how to install `docker-machine`
8-
[is available here](https://docs.docker.com/machine/install-machine/).
12+
`docker-machine` is required, [see the installation documentation](https://docs.docker.com/machine/install-machine/).
13+
14+
Then, install the latest release for your environment from the [releases list](https://github.com/linode/docker-machine-driver-linode/releases).
15+
16+
### Installing from source
17+
18+
If you would rather build from source, you will need to have a working `go` 1.11+ environment,
19+
20+
```bash
21+
eval $(go env)
22+
export PATH="$PATH:$GOPATH/bin"
23+
```
924

10-
Or, you can install `docker-machine` from source by running:
25+
You can then install `docker-machine` from source by running:
1126

1227
```bash
1328
go get github.com/docker/machine
1429
cd $GOPATH/src/github.com/docker/machine
1530
make build
1631
```
1732

18-
Then, install `docker-machine-driver-linode` driver in the `$GOPATH` and add `$GOPATH/bin` to the `$PATH` environment variable.
33+
And then compile the `docker-machine-driver-linode` driver:
1934

2035
```bash
2136
go get github.com/linode/docker-machine-driver-linode

go.mod

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module github.com/linode/docker-machine-driver-linode
2+
3+
require (
4+
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
5+
github.com/davecgh/go-spew v1.1.0 // indirect
6+
github.com/dnaeon/go-vcr v1.0.0 // indirect
7+
github.com/docker/docker v0.0.0-20180808234805-4122eb1a43a4 // indirect
8+
github.com/docker/machine v0.15.0
9+
github.com/google/go-cmp v0.2.0 // indirect
10+
github.com/linode/linodego v0.7.0
11+
github.com/onsi/ginkgo v1.7.0 // indirect
12+
github.com/onsi/gomega v1.4.3 // indirect
13+
github.com/pkg/errors v0.8.0 // indirect
14+
github.com/pmezard/go-difflib v1.0.0 // indirect
15+
github.com/sirupsen/logrus v1.0.6 // indirect
16+
github.com/stretchr/testify v1.2.2
17+
golang.org/x/crypto v0.0.0-20180808211826-de0752318171 // indirect
18+
golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc
19+
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f // indirect
20+
google.golang.org/appengine v1.1.0 // indirect
21+
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
22+
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
23+
gopkg.in/resty.v1 v1.10.3 // indirect
24+
gopkg.in/yaml.v2 v2.2.2 // indirect
25+
gotest.tools v2.2.0+incompatible // indirect
26+
)

0 commit comments

Comments
 (0)