From 53cd8778999d1dfad0870a4d09dbf5f981695505 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Tue, 22 Apr 2014 08:25:40 +0200 Subject: [PATCH] More portable hostname --- build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index a429b932..83ea2366 100755 --- a/build.sh +++ b/build.sh @@ -6,7 +6,8 @@ distFiles=(README.md LICENSE) # apart from the binary itself version=$(git describe --always --dirty) date=$(date +%s) user=$(whoami) -host=$(hostname -s) +host=$(hostname) +host=${host%%.*} ldflags="-w -X main.Version $version -X main.BuildStamp $date -X main.BuildUser $user -X main.BuildHost $host" build() {