From 25c6ce7b24416601834f74ce3b39bbcb435716ba Mon Sep 17 00:00:00 2001 From: Richard Wilkes Date: Sun, 20 Oct 2024 13:47:55 -0700 Subject: [PATCH] Tweak build for macOS --- build.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/build.sh b/build.sh index 289048e4..fd4815bd 100755 --- a/build.sh +++ b/build.sh @@ -54,15 +54,6 @@ for arg in "$@"; do BUILD_GO=1 BUILD_GEN=1 SOMETHING=1 - case $(uname -s) in - Darwin*) - if [ "$(uname -p)" == "arm" ]; then - export MACOSX_DEPLOYMENT_TARGET=11 - else - export MACOSX_DEPLOYMENT_TARGET=10.15 - fi - ;; - esac ;; --help | -h) echo "$0 [options]" @@ -90,6 +81,16 @@ if [ "$SOMETHING"x != "1x" ]; then BUILD_GO=1 fi +case $(uname -s) in +Darwin*) + if [ "$(uname -p)" == "arm" ]; then + export MACOSX_DEPLOYMENT_TARGET=11 + else + export MACOSX_DEPLOYMENT_TARGET=10.15 + fi + ;; +esac + LDFLAGS_ALL="-X github.com/richardwilkes/toolbox/cmdline.AppVersion=$RELEASE $EXTRA_LD_FLAGS" STD_FLAGS="-v -buildvcs=true $EXTRA_BUILD_FLAGS"