From deb51e425ec0dbd15810d9211434ef7448747b16 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Mon, 16 Jul 2018 11:41:25 -0400
Subject: [PATCH 3/3] Add build_id
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
---
script/build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/script/build b/script/build
index 458bad0eddc84cfe0253d4bb95e10db415c5f1d8..864ba544f32129bb311ef9942b73cec7521de8ef 100755
--- a/script/build
+++ b/script/build
@@ -11,11 +11,11 @@ find_source_files() {
find . -maxdepth 2 -name '*.go' '!' -name '*_test.go' "$@"
}
build_hub() {
mkdir -p "$(dirname "$1")"
- go build -ldflags "-X github.com/github/hub/version.Version=`./script/version`" -o "$1"
+ 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"
}
[ $# -gt 0 ] || set -- -o "bin/hub${windows:+.exe}"
case "$1" in
--
2.17.1