Skip to content

Commit

Permalink
Add glide tool as go dependency management
Browse files Browse the repository at this point in the history
 - Removed lib9p submodule
  • Loading branch information
praveenkumar committed Jul 3, 2017
1 parent 16568d1 commit 5b0744e
Show file tree
Hide file tree
Showing 1,786 changed files with 269,167 additions and 1,758 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "vendor/lib9p"]
path = vendor/lib9p
url = https://github.com/jceel/lib9p.git
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ endif
GO_BUILD_TAGS ?= lib9p
# included 'lib9p' in the $GO_BUILD_TAGS, and exists 'lib9p.a' file
ifneq (,$(findstring lib9p,$(GO_BUILD_TAGS)))
CGO_CFLAGS += -I${PWD}/vendor/lib9p
CGO_CFLAGS += -I${PWD}/${LIB9P_DIR}
CGO_LDFLAGS += ${PWD}/vendor/build/lib9p/lib9p.a
bin/docker-machine-driver-xhyve: lib9p
endif
Expand Down Expand Up @@ -173,6 +173,9 @@ export CGO_ENABLED=1

default: build

vendor:
glide install -v

build: bin/docker-machine-driver-xhyve

vendor/github.com/zchee/libhyperkit/mirage_block_ocaml.o:
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,26 @@ $ sudo chown root:wheel /usr/local/bin/docker-machine-driver-xhyve
$ sudo chmod u+s /usr/local/bin/docker-machine-driver-xhyve
```

We use [Glide](https://github.com/Masterminds/glide) for dependency management.

```sh
$ go get github.com/Masterminds/glide
```

This will install the glide binary into `$GOPATH/bin`.

Updating Dependencies

If your work requires a change to the dependencies, you need to update the Glide
configuration.

- Edit glide.yaml to change the dependencies as needed.
- 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.
- Check-in the updated `glide.yaml` and `glide.lock` files.
- Test that everything still compiles with the new lock file in place by running make clean && make.

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`.

Usage
-----

Expand Down
55 changes: 55 additions & 0 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package: github.com/zchee/docker-machine-driver-xhyve
import:
- package: github.com/docker/machine
version: v0.11.0
subpackages:
- libmachine/drivers
- libmachine/drivers/plugin
- libmachine/log
- libmachine/mcnflag
- libmachine/mcnutils
- libmachine/ssh
- libmachine/state
- package: github.com/johanneswuerbach/nfsexports
- package: github.com/mitchellh/go-ps
- package: github.com/zchee/go-qcow2
- package: github.com/zchee/libhyperkit
- package: github.com/jceel/lib9p
version: 7be3e0b914fbb2d2ecfe2984d02bacfd8e762eae
testImport:
- package: github.com/stretchr/testify
version: v1.1.4
subpackages:
- assert
4 changes: 2 additions & 2 deletions mk/lib9p.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LIB9P_DIR := vendor/lib9p
LIB9P_DIR := vendor/github.com/jceel/lib9p

LIB9P_CFLAGS := \
-Weverything \
Expand Down Expand Up @@ -36,7 +36,7 @@ lib9p: ${LIB9P_BUILD_DIR} $(LIB9P_LIB)
vendor/build/lib9p:
$(VERBOSE) mkdir -p ${LIB9P_BUILD_DIR} ${LIB9P_BUILD_DIR}/sbuf ${LIB9P_BUILD_DIR}/transport ${LIB9P_BUILD_DIR}/backend

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

$(LIB9P_LIB): $(LIB9P_LIB_OBJS)
Expand Down
22 changes: 22 additions & 0 deletions vendor/github.com/davecgh/go-spew/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions vendor/github.com/davecgh/go-spew/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions vendor/github.com/davecgh/go-spew/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

194 changes: 194 additions & 0 deletions vendor/github.com/davecgh/go-spew/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5b0744e

Please sign in to comment.