From e372b5ed67117c3536362150fc3f852550ba0def Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 5 May 2017 13:16:58 -0700 Subject: [PATCH] build: Fix release build names. (#4263) Currently due to the occurrence of 6 arguments from `gen-ldflags.go` leads to a bug where the binaries genenerated have wrong names. As shown below. ``` If you want to build for all, Just press Enter: linux/amd64 --> linux/amd64:github.com/minio/minio $ ls release/linux-amd64/ [2017-05-04 23:08:51 PDT] 17MiB minio [2017-05-04 23:08:51 PDT] 17MiB minio.2017-05-05T06:08:22Z [2017-05-04 23:08:51 PDT] 76B minio.shasum ``` This PR fixes this issue by retaining the previous release binary names. ``` If you want to build for all, Just press Enter: linux/amd64 --> linux/amd64:github.com/minio/minio $ ls release/linux-amd64/ [2017-05-04 23:08:51 PDT] 17MiB minio [2017-05-04 23:08:51 PDT] 17MiB minio.RELEASE.2017-05-05T06-08-22Z [2017-05-04 23:08:51 PDT] 76B minio.shasum ``` --- buildscripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildscripts/build.sh b/buildscripts/build.sh index 79a7778c8..184408c3f 100755 --- a/buildscripts/build.sh +++ b/buildscripts/build.sh @@ -5,7 +5,7 @@ _init() { LDFLAGS=$(go run buildscripts/gen-ldflags.go) # Extract release tag - release_tag=$(echo $LDFLAGS | awk {'print $4'} | cut -f2 -d=) + release_tag=$(echo $LDFLAGS | awk {'print $6'} | cut -f2 -d=) # Verify release tag. if [ -z "$release_tag" ]; then