6c988b1
From a9a5eab256bcff327fe6cf56b408bd08065ffbd3 Mon Sep 17 00:00:00 2001
8c8041c
From: Stephen Gallagher <sgallagh@redhat.com>
8c8041c
Date: Mon, 16 Jul 2018 11:41:25 -0400
6c988b1
Subject: [PATCH 3/4] Add build_id
8c8041c
8c8041c
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
8c8041c
---
8c8041c
 script/build | 2 +-
8c8041c
 1 file changed, 1 insertion(+), 1 deletion(-)
8c8041c
8c8041c
diff --git a/script/build b/script/build
8c8041c
index 458bad0eddc84cfe0253d4bb95e10db415c5f1d8..864ba544f32129bb311ef9942b73cec7521de8ef 100755
8c8041c
--- a/script/build
8c8041c
+++ b/script/build
8c8041c
@@ -11,11 +11,11 @@ find_source_files() {
8c8041c
   find . -maxdepth 2 -name '*.go' '!' -name '*_test.go' "$@"
8c8041c
 }
8c8041c
 
8c8041c
 build_hub() {
8c8041c
   mkdir -p "$(dirname "$1")"
8c8041c
-  go build -ldflags "-X github.com/github/hub/version.Version=`./script/version`" -o "$1"
8c8041c
+  go build -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -X github.com/github/hub/version.Version=`./script/version`" -o "$1"
8c8041c
 }
8c8041c
 
8c8041c
 [ $# -gt 0 ] || set -- -o "bin/hub${windows:+.exe}"
8c8041c
 
8c8041c
 case "$1" in
8c8041c
-- 
6c988b1
2.20.1
8c8041c