From 93666827f4137aab024dcc61bc0628224b34f959 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 13 Apr 2016 23:34:55 -0700 Subject: [PATCH] release: Add freebsd/amd64 build and remove zip, tgz. (#1316) --- buildscripts/build.sh | 26 +------------------------- update-main.go | 8 ++++---- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/buildscripts/build.sh b/buildscripts/build.sh index 9d5d4046f..f5be940f4 100755 --- a/buildscripts/build.sh +++ b/buildscripts/build.sh @@ -23,15 +23,12 @@ _init() { fi # List of supported architectures - SUPPORTED_OSARCH='linux/386 linux/amd64 linux/arm windows/386 windows/amd64 darwin/amd64' + SUPPORTED_OSARCH='linux/386 linux/amd64 linux/arm windows/386 windows/amd64 darwin/amd64 freebsd/amd64' ## System binaries CP=`which cp` SHASUM=`which shasum` - GZIP=`which gzip` - ZIP=`which zip` SED=`which sed` - TAR=`which tar` } go_build() { @@ -48,9 +45,6 @@ go_build() { release_real_bin="$release_str/$os-$arch/$(basename $package)" # Release shasum name release_shasum="$release_str/$os-$arch/$(basename $package).shasum" - # Release zip file. - release_real_zip="$(basename $package).zip" - release_real_tgz="$(basename $package).tgz" # Go build to build the binary. GOOS=$os GOARCH=$arch go build --ldflags "${LDFLAGS}" -o $release_bin @@ -65,24 +59,6 @@ go_build() { # Calculate shasum shasum_str=$(${SHASUM} ${release_bin}) echo ${shasum_str} | $SED "s/$release_str\/$os-$arch\///g" > $release_shasum - - # Create a compressed file. - if [ $os == "windows" ]; then - cd "$release_str/$os-$arch" - $ZIP -r $release_real_zip $(basename $package).exe - cd - - elif [ $os == "darwin" ]; then - cd "$release_str/$os-$arch" - $ZIP -r $release_real_zip $(basename $package) - cd - - elif [ $os == "linux" ]; then - cd "$release_str/$os-$arch" - $TAR -czf $release_real_tgz $(basename $package) - cd - - else - echo "$os operating system is not supported." - exit 1 - fi } main() { diff --git a/update-main.go b/update-main.go index c4c1553bd..617c5c9b3 100644 --- a/update-main.go +++ b/update-main.go @@ -143,12 +143,12 @@ func getReleaseUpdate(updateURL string, noError bool) updateMessage { // Get the downloadURL. var downloadURL string switch runtime.GOOS { - case "windows", "darwin": - // For windows and darwin. - downloadURL = newUpdateURLPrefix + "/minio.zip" + case "windows": + // For windows. + downloadURL = newUpdateURLPrefix + "/minio.exe" default: // For all other operating systems. - downloadURL = newUpdateURLPrefix + "/minio.tgz" + downloadURL = newUpdateURLPrefix + "/minio" } // Initialize update message.