summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-08-03 22:10:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-03 22:10:23 (GMT)
commit6395499a68d28f7211e9b4f6d9b2482c7b1681d6 (patch)
tree4551b31b3e82c8b72ef1fee1844ff46e54731342 /contrib
parentc0728edfb676588d9c47738889445450efea94e0 (diff)
parentaccb613afd2298510f6fc02e0ed05ecb84f6a6ff (diff)
downloadgit-6395499a68d28f7211e9b4f6d9b2482c7b1681d6.zip
git-6395499a68d28f7211e9b4f6d9b2482c7b1681d6.tar.gz
git-6395499a68d28f7211e9b4f6d9b2482c7b1681d6.tar.bz2
Merge branch 'pm/build-persistent-https-with-recent-go'
The build procedure for "git persistent-https" helper (in contrib/) has been updated so that it can be built with more recent versions of Go. * pm/build-persistent-https-with-recent-go: contrib/persistent-https: use Git version for build label contrib/persistent-https: update ldflags syntax for Go 1.7+
Diffstat (limited to 'contrib')
-rw-r--r--contrib/persistent-https/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/persistent-https/Makefile b/contrib/persistent-https/Makefile
index 92baa3b..52b84ba 100644
--- a/contrib/persistent-https/Makefile
+++ b/contrib/persistent-https/Makefile
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-BUILD_LABEL=$(shell date +"%s")
+BUILD_LABEL=$(shell cut -d" " -f3 ../../GIT-VERSION-FILE)
TAR_OUT=$(shell go env GOOS)_$(shell go env GOARCH).tar.gz
all: git-remote-persistent-https git-remote-persistent-https--proxy \
@@ -25,8 +25,10 @@ git-remote-persistent-http: git-remote-persistent-https
ln -f -s git-remote-persistent-https git-remote-persistent-http
git-remote-persistent-https:
+ case $$(go version) in \
+ "go version go"1.[0-5].*) EQ=" " ;; *) EQ="=" ;; esac && \
go build -o git-remote-persistent-https \
- -ldflags "-X main._BUILD_EMBED_LABEL $(BUILD_LABEL)"
+ -ldflags "-X main._BUILD_EMBED_LABEL$${EQ}$(BUILD_LABEL)"
clean:
rm -f git-remote-persistent-http* *.tar.gz