Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2016-12-20 16:43:49 +0300
committerAhmad Sherif <me@ahmadsherif.com>2016-12-20 16:44:18 +0300
commit67006337df88a3fdd97cd13b39a103657db2ab05 (patch)
tree17bd4b42ae48585fdab94b6133b890e99f468370
parentb549c388d3f72439f4f3653f2cd14f54a2c31eae (diff)
Use gitaly-client as a blueprint for all required git binariesfix/client-binaries
-rw-r--r--.gitignore4
-rw-r--r--Makefile7
-rw-r--r--cmd/client/main.go2
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
diff --git a/Makefile b/Makefile
index bf61ec5da..c2884a176 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
}