Skip to content

Commit d202ca9

Browse files
authored
Merge pull request #309 from cbusbey/dep
using dep for dep mgmt
2 parents a870cf3 + c8912a4 commit d202ca9

File tree

6 files changed

+111
-109
lines changed

6 files changed

+111
-109
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ vendor/*/
55
_test/test
66
_test/echo_server
77
_test/tmp
8+
_vendor*

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ matrix:
2121
- go: tip
2222

2323
install:
24-
- go get -u github.com/kardianos/govendor
25-
- govendor sync
24+
- go get -u github.com/golang/dep/cmd/dep
25+
- dep ensure
2626

2727
script: if [ -z "$FIX_TEST" ]; then make generate && make build && make; else make build_accept && make $FIX_TEST; fi

Gopkg.lock

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

Gopkg.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
# Gopkg.toml example
3+
#
4+
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
5+
# for detailed Gopkg.toml documentation.
6+
#
7+
# required = ["github.com/user/thing/cmd/thing"]
8+
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
9+
#
10+
# [[constraint]]
11+
# name = "github.com/user/project"
12+
# version = "1.0.0"
13+
#
14+
# [[constraint]]
15+
# name = "github.com/user/project2"
16+
# branch = "dev"
17+
# source = "github.com/myfork/project2"
18+
#
19+
# [[override]]
20+
# name = "github.com/x/y"
21+
# version = "2.4.0"
22+
23+
24+
[[constraint]]
25+
name = "github.com/mattn/go-sqlite3"
26+
version = "1.2.0"
27+
28+
[[constraint]]
29+
name = "github.com/shopspring/decimal"
30+
branch = "master"
31+
32+
[[constraint]]
33+
name = "github.com/stretchr/testify"
34+
version = "1.1.4"

README.md

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ Next, using [Git](https://git-scm.com/), clone this repository into `$GOPATH/src
4747

4848
### Installing Dependencies
4949

50-
QuickFIX/Go uses [govendor](https://github.com/kardianos/govendor) to manage the vendored dependencies. Install govendor with `go get`:
50+
QuickFIX/Go uses [dep](https://github.com/golang/dep) to manage the vendored dependencies. Install dep with `go get`:
5151

5252
```sh
53-
$ go get github.com/kardianos/govendor
53+
$ go get -u github.com/golang/dep/cmd/dep
5454
```
5555

56-
Run `govendor sync` to install the correct versioned dependencies into `vendor/, which Go 1.6+ automatically recognizes and loads.
56+
Run `dep ensure` to install the correct versioned dependencies into `vendor/`, which Go 1.6+ automatically recognizes and loads.
5757

5858
```sh
59-
$ $GOPATH/bin/govendor sync
59+
$ $GOPATH/bin/dep ensure
6060
```
6161

6262
**Note:** No vendored dependencies are included in the QuickFIX/Go source.
@@ -101,37 +101,34 @@ If you are developing QuickFIX/Go, there are a few tasks you might need to perfo
101101

102102
#### Adding a dependency
103103

104-
If you are adding a dependency, you will need update the govendor manifest in the same Pull Request as the code that depends on it. You should do this in a separate commit from your code, as this makes PR review easier and Git history simpler to read in the future.
104+
If you are adding a dependency, you will need to update the dep manifest in the same Pull Request as the code that depends on it. You should do this in a separate commit from your code, as this makes PR review easier and Git history simpler to read in the future.
105105

106106
To add a dependency:
107107

108-
Assuming your work is on a branch called `my-feature-branch`, the steps look like this:
109-
110-
1. Add the new package to your GOPATH:
111-
112-
```bash
113-
go get github.com/quickfixgo/my-project
114-
```
115-
116-
2. Add the new package to your vendor/ directory:
117-
118-
```bash
119-
govendor add github.com/quickfixgo/my-project
120-
```
121-
122-
3. Review the changes in git and commit them.
108+
1. Add the dependency using `dep`:
109+
```bash
110+
$ dep ensure -add github.com/foo/bar
111+
```
112+
2. Review the changes in git and commit them.
123113

124114
#### Updating a dependency
125115

126-
To update a dependency:
116+
To update a dependency to the latest version allowed by constraints in `Gopkg.toml`:
127117

128-
1. Fetch the dependency:
118+
1. Run:
119+
```bash
120+
$ dep ensure -update github.com/foo/bar
121+
```
122+
2. Review the changes in git and commit them.
129123

130-
```bash
131-
govendor fetch github.com/quickfixgo/my-project
132-
```
124+
To change the allowed version/branch/revision of a dependency:
133125

134-
2. Review the changes in git and commit them.
126+
1. Manually edit `Gopkg.toml`
127+
2. Run:
128+
```bash
129+
$ dep ensure
130+
```
131+
3. Review the changes in git and commit them.
135132

136133
Licensing
137134
---------

vendor/vendor.json

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

0 commit comments

Comments
 (0)