Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Commit cea41d2

Browse files
committedAug 18, 2016
Fix mock generation
* Switch to fork that supports generating mocks for vendored dependencies (golang/mock#28) * Install vendored mockgen before generating mocks * Do not try to find files when no directories are found
1 parent 570ba87 commit cea41d2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed
 

‎.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
url = https://github.com/cloudfoundry/cli.git
44
[submodule "vendor/github.com/golang/mock"]
55
path = vendor/github.com/golang/mock
6-
url = https://github.com/golang/mock.git
6+
url = https://github.com/pcfdev-forks/mock.git
77
[submodule "vendor/github.com/onsi/ginkgo"]
88
path = vendor/github.com/onsi/ginkgo
99
url = https://github.com/onsi/ginkgo

‎bin/generate-mocks

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
pcfdev_dir=$(cd `dirname $0` && cd .. && pwd)
44
mocks_dirs=$(go list -f '{{.Dir}}' github.com/pivotal-cf/pcfdev-cli/... | grep -v /vendor/ | grep '/mocks$')
5-
find $mocks_dirs -name "*.go" -exec rm {} \;
5+
if [[ -n "$mocks_dirs" ]]; then
6+
find $mocks_dirs -name "*.go" -exec rm {} \;
7+
fi
68

9+
go install github.com/pivotal-cf/pcfdev-cli/vendor/github.com/golang/mock/mockgen
710
go generate $(go list github.com/pivotal-cf/pcfdev-cli/... | grep -v /vendor/)

‎vendor/github.com/golang/mock

Submodule mock updated from bd3c8e8 to c974af7

0 commit comments

Comments
 (0)