diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-12-20 16:43:49 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-12-20 16:44:18 +0300 |
commit | 67006337df88a3fdd97cd13b39a103657db2ab05 (patch) | |
tree | 17bd4b42ae48585fdab94b6133b890e99f468370 | |
parent | b549c388d3f72439f4f3653f2cd14f54a2c31eae (diff) |
Use gitaly-client as a blueprint for all required git binariesfix/client-binaries
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | cmd/client/main.go | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore index c1c3d9944..fac71df77 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,7 @@ _build vendor/*/ git-daemon-client git-daemon-server +git +git-upload-archive +git-upload-pack +git-receive-pack @@ -2,6 +2,7 @@ PKG=gitlab.com/gitlab-org/git-access-daemon BUILD_DIR=$(shell pwd) CLIENT_BIN=git-daemon-client SERVER_BIN=git-daemon-server +GIT_BINARIES=git git-upload-archive git-upload-pack git-receive-pack export GOPATH=${BUILD_DIR}/_build export PATH:=${GOPATH}/bin:$(PATH) @@ -22,6 +23,9 @@ deps: ${BUILD_DIR}/_build build: deps go build -o ${SERVER_BIN} cmd/server/main.go go build -o ${CLIENT_BIN} cmd/client/main.go + for bin in ${GIT_BINARIES}; do \ + cp ${CLIENT_BIN} $$bin; \ + done test: ${BUILD_DIR}/_build deps cd ${BUILD_DIR}/_build/src/${PKG}/server && go test -v @@ -32,3 +36,6 @@ clean: rm -rf client/testdata [ -f ${CLIENT_BIN} ] && rm ${CLIENT_BIN} [ -f ${SERVER_BIN} ] && rm ${SERVER_BIN} + for bin in ${GIT_BINARIES}; do \ + [ -f $$bin ] && rm $$bin; \ + done diff --git a/cmd/client/main.go b/cmd/client/main.go index b00413fe6..4f1ae8508 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -10,8 +10,6 @@ func main() { client := client.NewClient("127.0.0.1:6666") defer client.Close() - os.Args[0] = "git" - exitStatus := client.Run(os.Args) os.Exit(exitStatus) } |