From d733d68b0cfe21275146ca75cb67bb756a18ece2 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 22 Dec 2016 12:54:26 -0800 Subject: [PATCH] enable static build releases with CGO_ENABLED=0 (#1935) Also removing darwin build, since we do brew install. Removing solaris since it doesn't build anymore. Fixes #1933 --- README.md | 120 +++++++++++++++++------------------------- buildscripts/build.sh | 6 +-- 2 files changed, 51 insertions(+), 75 deletions(-) diff --git a/README.md b/README.md index 21693156..5018d9cf 100644 --- a/README.md +++ b/README.md @@ -23,30 +23,58 @@ version Print version. ``` -## 1. Download Minio Client - +## GNU/Linux +### Binary Download | Platform | Architecture | URL | | ---------- | -------- |------| |GNU/Linux|64-bit Intel|https://dl.minio.io/client/mc/release/linux-amd64/mc| ||32-bit Intel|https://dl.minio.io/client/mc/release/linux-386/mc| ||32-bit ARM|https://dl.minio.io/client/mc/release/linux-arm/mc| -|Apple OS X|64-bit Intel|https://dl.minio.io/client/mc/release/darwin-amd64/mc| -|Microsoft Windows|64-bit|https://dl.minio.io/client/mc/release/windows-amd64/mc.exe| -||32-bit|https://dl.minio.io/client/mc/release/windows-386/mc.exe | -|FreeBSD|64-bit|https://dl.minio.io/client/mc/release/freebsd-amd64/mc| -|Solaris/Illumos|64-bit|https://dl.minio.io/client/mc/release/solaris-amd64/mc| -### Install from Homebrew +```sh -Install minio packages using [Homebrew](http://brew.sh/) +chmod +x mc +./mc --help + +``` + +## macOS +### Homebrew +Install mc packages using [Homebrew](http://brew.sh/) ```sh brew install minio-mc mc --help + ``` -### Install from Source +## Microsoft Windows +### Binary Download +| Platform | Architecture | URL | +| ---------- | -------- |------| +|Microsoft Windows|64-bit|https://dl.minio.io/client/mc/release/windows-amd64/mc.exe| +||32-bit|https://dl.minio.io/client/mc/release/windows-386/mc.exe | +```sh + +mc.exe --help + +``` + +## FreeBSD +### Binary Download +| Platform | Architecture | URL | +| ---------- | -------- |------| +|FreeBSD|64-bit|https://dl.minio.io/client/mc/release/freebsd-amd64/mc| + +```sh + +chmod 755 mc +./mc --help + +``` + +## Install from Source Source installation is intended only for developers and advanced users. `mc update` command does not support upgrading from source based installation. Please download official releases from https://minio.io/downloads/#minio-client. If you do not have a working Golang environment, please follow [How to install Golang](https://docs.minio.io/docs/how-to-install-golang). @@ -57,61 +85,11 @@ go get -u github.com/minio/mc ``` -## 2. Run Minio Client - - -### GNU/Linux - -```sh - -chmod +x mc -./mc --help - -``` - -### OS X - -```sh - -chmod 755 mc -./mc --help - -``` - -### Microsoft Windows - -```sh - -mc.exe --help - -``` - -### Solaris/Illumos - -```sh - -chmod 755 mc -./mc --help - -``` - -### FreeBSD - -```sh - -chmod 755 mc -./mc --help - -``` - -## 3. Add a Cloud Storage Service - -Note: If you are planning to use `mc` only on POSIX compatible filesystems, you may skip this step and proceed to **Step 4**. +## Add a Cloud Storage Service +If you are planning to use `mc` only on POSIX compatible filesystems, you may skip this step and proceed to [everyday use](#everyday-use). To add one or more Amazon S3 compatible hosts, please follow the instructions below. `mc` stores all its configuration information in ``~/.mc/config.json`` file. -#### Usage - ```sh mc config host add @@ -121,7 +99,6 @@ mc config host add +## Everyday Use You may add shell aliases to override your common Unix tools. ```sh @@ -182,11 +157,12 @@ alias mkdir='mc mb' alias pipe='mc pipe' ``` -## 6. Explore Further +## Explore Further - [Minio Client Complete Guide](https://docs.minio.io/docs/minio-client-complete-guide) - [Minio Quickstart Guide](https://docs.minio.io/docs/minio-quickstart-guide) +- [The Minio documentation website](https://docs.minio.io) -## 7. Contribute +## Contribute to Minio Project +Please follow Minio [Contributor's Guide](https://github.com/minio/mc/blob/master/CONTRIBUTING.md) -[Contributors Guide](https://github.com/minio/mc/blob/master/CONTRIBUTING.md) diff --git a/buildscripts/build.sh b/buildscripts/build.sh index 117d2498..69e6503d 100755 --- a/buildscripts/build.sh +++ b/buildscripts/build.sh @@ -23,7 +23,7 @@ _init() { fi # List of supported architectures - SUPPORTED_OSARCH='linux/386 linux/amd64 linux/arm windows/386 windows/amd64 darwin/amd64 solaris/amd64 freebsd/amd64' + SUPPORTED_OSARCH='linux/386 linux/amd64 linux/arm windows/386 windows/amd64 freebsd/amd64' ## System binaries CP=`which cp` @@ -46,8 +46,8 @@ go_build() { # Release shasum name release_shasum="$release_str/$os-$arch/$(basename $package).shasum" - # Go build to build the binary. - GOOS=$os GOARCH=$arch go build --ldflags "${LDFLAGS}" -o $release_bin + # Using `go build` to build the binary. + CGO_ENABLED=0 GOOS=$os GOARCH=$arch go build --ldflags "${LDFLAGS}" -o $release_bin # Create copy if [ $os == "windows" ]; then