From 98607fdfe602b2e6f7a3ab848c9fb260fd88f1ca Mon Sep 17 00:00:00 2001 From: Ciprian Dorin Craciun Date: Thu, 15 Nov 2018 20:01:54 +0200 Subject: [PATCH] [readme] Update build instructions --- documentation/readme.rst | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/documentation/readme.rst b/documentation/readme.rst index 8766a3f..5220c69 100644 --- a/documentation/readme.rst +++ b/documentation/readme.rst @@ -255,8 +255,10 @@ Fetch the sources :: git clone \ + --depth 1 \ + --recurse-submodules --shallow-submodules \ https://github.com/cipriancraciun/go-cdb-http.git \ - ./go-cdb-http + /tmp/go-cdb-http/src Compile the binaries @@ -264,23 +266,24 @@ Compile the binaries Prepare the Go environment: :: - export -- GOPATH=/tmp/go-cdb-http/go - - go get -v -d ./go-cdb-http/sources/... + mkdir /tmp/go-cdb-http/go + ln -s -T ../src/vendor /tmp/go-cdb-http/go/src Compile the Go binnaries: :: - export -- GOPATH=/tmp/go-cdb-http/go + export GOPATH=/tmp/go-cdb-http/go + + mkdir /tmp/go-cdb-http/bin go build \ -ldflags '-s' \ - -o /tmp/go-cdb-http/cdb-http-archiver \ - ./go-cdb-http/sources/cmd/archiver.go + -o /tmp/go-cdb-http/bin/cdb-http-archiver \ + /tmp/go-cdb-http/src/sources/cmd/archiver.go go build \ -ldflags '-s' \ - -o /tmp/go-cdb-http/cdb-http-server \ - ./go-cdb-http/sources/cmd/server.go + -o /tmp/go-cdb-http/bin/cdb-http-server \ + /tmp/go-cdb-http/src/sources/cmd/server.go Deploy the binaries @@ -290,8 +293,8 @@ Deploy the binaries :: - cp /tmp/go-cdb-http/cdb-http-archiver /usr/local/bin - cp /tmp/go-cdb-http/cdb-http-server /usr/local/bin + cp /tmp/go-cdb-http/bin/cdb-http-archiver /usr/local/bin + cp /tmp/go-cdb-http/bin/cdb-http-server /usr/local/bin