mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
release: Add freebsd/amd64 build and remove zip, tgz. (#1316)
This commit is contained in:
parent
ac30bef72a
commit
93666827f4
@ -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() {
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user