Skip to content

Commit 5b0744e

Browse files
committed
Add glide tool as go dependency management
- Removed lib9p submodule
1 parent 16568d1 commit 5b0744e

File tree

1,786 files changed

+269167
-1758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,786 files changed

+269167
-1758
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "vendor/lib9p"]
2-
path = vendor/lib9p
3-
url = https://github.com/jceel/lib9p.git

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ endif
117117
GO_BUILD_TAGS ?= lib9p
118118
# included 'lib9p' in the $GO_BUILD_TAGS, and exists 'lib9p.a' file
119119
ifneq (,$(findstring lib9p,$(GO_BUILD_TAGS)))
120-
CGO_CFLAGS += -I${PWD}/vendor/lib9p
120+
CGO_CFLAGS += -I${PWD}/${LIB9P_DIR}
121121
CGO_LDFLAGS += ${PWD}/vendor/build/lib9p/lib9p.a
122122
bin/docker-machine-driver-xhyve: lib9p
123123
endif
@@ -173,6 +173,9 @@ export CGO_ENABLED=1
173173

174174
default: build
175175

176+
vendor:
177+
glide install -v
178+
176179
build: bin/docker-machine-driver-xhyve
177180

178181
vendor/github.com/zchee/libhyperkit/mirage_block_ocaml.o:

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,26 @@ $ sudo chown root:wheel /usr/local/bin/docker-machine-driver-xhyve
8181
$ sudo chmod u+s /usr/local/bin/docker-machine-driver-xhyve
8282
```
8383

84+
We use [Glide](https://github.com/Masterminds/glide) for dependency management.
85+
86+
```sh
87+
$ go get github.com/Masterminds/glide
88+
```
89+
90+
This will install the glide binary into `$GOPATH/bin`.
91+
92+
Updating Dependencies
93+
94+
If your work requires a change to the dependencies, you need to update the Glide
95+
configuration.
96+
97+
- Edit glide.yaml to change the dependencies as needed.
98+
- Delete `glide.lock` and re-create the vendor directory by running `make vendor`. Glide will recognize that there is no lock file and recalculatethe required dependencies.
99+
- Check-in the updated `glide.yaml` and `glide.lock` files.
100+
- Test that everything still compiles with the new lock file in place by running make clean && make.
101+
102+
Note: In some cases the Glide cache located under ~/.glide/cache can get corrupted. If you seeing Glide errors during `make vendor`, you can clear the Glide cache via `glide cc`.
103+
84104
Usage
85105
-----
86106

glide.lock

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

glide.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package: github.com/zchee/docker-machine-driver-xhyve
2+
import:
3+
- package: github.com/docker/machine
4+
version: v0.11.0
5+
subpackages:
6+
- libmachine/drivers
7+
- libmachine/drivers/plugin
8+
- libmachine/log
9+
- libmachine/mcnflag
10+
- libmachine/mcnutils
11+
- libmachine/ssh
12+
- libmachine/state
13+
- package: github.com/johanneswuerbach/nfsexports
14+
- package: github.com/mitchellh/go-ps
15+
- package: github.com/zchee/go-qcow2
16+
- package: github.com/zchee/libhyperkit
17+
- package: github.com/jceel/lib9p
18+
version: 7be3e0b914fbb2d2ecfe2984d02bacfd8e762eae
19+
testImport:
20+
- package: github.com/stretchr/testify
21+
version: v1.1.4
22+
subpackages:
23+
- assert

mk/lib9p.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
LIB9P_DIR := vendor/lib9p
1+
LIB9P_DIR := vendor/github.com/jceel/lib9p
22

33
LIB9P_CFLAGS := \
44
-Weverything \
@@ -36,7 +36,7 @@ lib9p: ${LIB9P_BUILD_DIR} $(LIB9P_LIB)
3636
vendor/build/lib9p:
3737
$(VERBOSE) mkdir -p ${LIB9P_BUILD_DIR} ${LIB9P_BUILD_DIR}/sbuf ${LIB9P_BUILD_DIR}/transport ${LIB9P_BUILD_DIR}/backend
3838

39-
vendor/build/lib9p/%.o: vendor/lib9p/%.c
39+
vendor/build/lib9p/%.o: ${LIB9P_DIR}/%.c
4040
$(VERBOSE) $(CC) $(LIB9P_CFLAGS) -c $< -o $@
4141

4242
$(LIB9P_LIB): $(LIB9P_LIB_OBJS)

vendor/github.com/davecgh/go-spew/.gitignore

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/davecgh/go-spew/.travis.yml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/davecgh/go-spew/LICENSE

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/davecgh/go-spew/README.md

Lines changed: 194 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)