diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-12-16 19:18:20 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-12-16 19:40:15 +0300 |
commit | 4e0be501d15e79fcef798ea1e384c743bd54fa14 (patch) | |
tree | cac8070cd2ed24d14cb4bd724c66339a992f878d | |
parent | 65bde08ef8ce6cacbd391dc0069e6fb5fda05cd1 (diff) |
Use govendor for managing dependencies
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | vendor/vendor.json | 13 |
3 files changed, 24 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore index 88e3b36c4..c1c3d9944 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ client/testdata/data _build +vendor/*/ git-daemon-client git-daemon-server @@ -4,21 +4,26 @@ CLIENT_BIN=git-daemon-client SERVER_BIN=git-daemon-server export GOPATH=${BUILD_DIR}/_build +export PATH:=${GOPATH}/bin:$(PATH) .PHONY: ${BUILD_DIR}/_build all: test build -build: - go build -o ${SERVER_BIN} cmd/server/main.go - go build -o ${CLIENT_BIN} cmd/client/main.go - ${BUILD_DIR}/_build: mkdir -p $@/src/${PKG} tar -cf - --exclude _build --exclude .git . | (cd $@/src/${PKG} && tar -xf -) touch $@ -test: ${BUILD_DIR}/_build +deps: ${BUILD_DIR}/_build + (which govendor) || go get -u github.com/kardianos/govendor + cd ${BUILD_DIR}/_build/src/${PKG} && govendor fetch +out + +build: deps + go build -o ${SERVER_BIN} cmd/server/main.go + go build -o ${CLIENT_BIN} cmd/client/main.go + +test: ${BUILD_DIR}/_build deps cd ${BUILD_DIR}/_build/src/${PKG}/server && go test -v cd ${BUILD_DIR}/_build/src/${PKG}/client && go test -v diff --git a/vendor/vendor.json b/vendor/vendor.json new file mode 100644 index 000000000..19ecc88d2 --- /dev/null +++ b/vendor/vendor.json @@ -0,0 +1,13 @@ +{ + "comment": "", + "ignore": "test", + "package": [ + { + "checksumSHA1": "kBeNcaKk56FguvPSUCEaH6AxpRc=", + "path": "github.com/golang/protobuf/proto", + "revision": "8ee79997227bf9b34611aee7946ae64735e6fd93", + "revisionTime": "2016-11-17T03:31:26Z" + } + ], + "rootPath": "gitlab.com/gitlab-org/git-access-daemon" +} |