From f6be550f1a6d10e5c2dd0b8285727ba0aed488cc Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Tue, 19 Feb 2019 15:10:30 +0100 Subject: [PATCH] scripts/build.sh: allow to set build settings when building this will for example allow me to have the following alias: alias buildmain='export T=$(mktemp -d) && ALL_XC_OS="linux darwin windows" ALL_XC_ARCH="amd64" GOLDFLAGS="-s -w" ./scripts/build.sh && cd pkg/ && for dir in *; do zip -r "$dir.zip" $dir & ; done ; wait && mv *.zip $T/. && open $T' that build only on 'main' platforms, so that I can share binaries easily. --- scripts/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index cf44e0713..4ebda8185 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,8 +2,8 @@ # This script builds the application from source for multiple platforms. # Determine the arch/os combos we're building for -ALL_XC_ARCH="386 amd64 arm arm64 ppc64le" -ALL_XC_OS="linux darwin windows freebsd openbsd solaris" +ALL_XC_ARCH=${ALL_XC_ARCH:-"386 amd64 arm arm64 ppc64le"} +ALL_XC_OS=${ALL_XC_OS:-"linux darwin windows freebsd openbsd solaris"} # Exit immediately if a command fails set -e