From 86dafecc1aa0f96c5ffbddbacacab124e88082b3 Mon Sep 17 00:00:00 2001 From: Sebastien Stormacq Date: Fri, 21 Oct 2022 22:46:28 +0200 Subject: [PATCH] update build scripts --- scripts/RELEASE_DOC.md | 2 +- scripts/bottle.sh | 2 +- scripts/build_binaries.sh | 4 ++-- scripts/build_fat_binary.sh | 4 ++-- scripts/release_sources.sh | 5 +++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/RELEASE_DOC.md b/scripts/RELEASE_DOC.md index 830018e..9db81f1 100644 --- a/scripts/RELEASE_DOC.md +++ b/scripts/RELEASE_DOC.md @@ -12,7 +12,7 @@ This script - creates a GitHub release - creates a brew formula with the new release -4. `./scripts/bottles.sh` +4. `./scripts/bottle.sh` This script - creates the brew bottles TAR file and the code to add to the formula diff --git a/scripts/bottle.sh b/scripts/bottle.sh index ad95f78..fb78e84 100755 --- a/scripts/bottle.sh +++ b/scripts/bottle.sh @@ -34,7 +34,7 @@ VERSION=$(cat VERSION) OS_NAMES=(arm64_monterey monterey) # Semantic version number split into a list using Ugly, bash 3 compatible syntax -IFS=" " read -r -a CURRENT_OS_VERSION <<<"$(sw_vers -productVersion | sed 's/\./ /g'))" +IFS=" " read -r -a CURRENT_OS_VERSION <<<"$(sw_vers -productVersion | sed 's/\./ /g')" CURRENT_OS_VERSION_MAJOR=${CURRENT_OS_VERSION[0]} CURRENT_OS_VERSION_MINOR=${CURRENT_OS_VERSION[1]} diff --git a/scripts/build_binaries.sh b/scripts/build_binaries.sh index dbce4cf..e7631a4 100755 --- a/scripts/build_binaries.sh +++ b/scripts/build_binaries.sh @@ -16,8 +16,8 @@ mkdir -p dist/x86_64 echo "\n📦 Downloading packages according to Package.resolved\n" swift package resolve -echo "\n🩹 Patching Switft Tools Support Core dependency to produce a static library\n" -sed -i .bak -E -e "s/^( *type: .dynamic,)$/\/\/\1/" .build/checkouts/swift-tools-support-core/Package.swift +# echo "\n🩹 Patching Switft Tools Support Core dependency to produce a static library\n" +# sed -i .bak -E -e "s/^( *type: .dynamic,)$/\/\/\1/" .build/checkouts/swift-tools-support-core/Package.swift echo "\n🏗 Building the ARM version\n" swift build --configuration release \ diff --git a/scripts/build_fat_binary.sh b/scripts/build_fat_binary.sh index 8a78ca1..03018f1 100755 --- a/scripts/build_fat_binary.sh +++ b/scripts/build_fat_binary.sh @@ -15,8 +15,8 @@ mkdir -p dist/fat echo "\n📦 Downloading packages according to Package.resolved\n" swift package --disable-sandbox resolve -echo "\n🩹 Patching Switft Tools Support Core dependency to produce a static library\n" -sed -i .bak -E -e "s/^( *type: .dynamic,)$/\/\/\1/" .build/checkouts/swift-tools-support-core/Package.swift +# echo "\n🩹 Patching Switft Tools Support Core dependency to produce a static library\n" +# sed -i .bak -E -e "s/^( *type: .dynamic,)$/\/\/\1/" .build/checkouts/swift-tools-support-core/Package.swift echo "\n🏗 Building the fat binary (x86_64 and arm64) version\n" swift build --configuration release \ diff --git a/scripts/release_sources.sh b/scripts/release_sources.sh index 549978d..1f717ee 100755 --- a/scripts/release_sources.sh +++ b/scripts/release_sources.sh @@ -5,7 +5,7 @@ set -o pipefail echo "Did you increment version number before running this script ?" exit -1 ###################### -VERSION="0.5" +VERSION="0.6" ###################### echo $VERSION > VERSION @@ -37,8 +37,9 @@ sed -E -e "s+URL+url \"$URL\"+g" \ scripts/xcodeinstall.template > scripts/xcodeinstall.rb echo "\n🍺 Pushing new formula\n" -cp scripts/xcodeinstall.rb ../homebrew-macos pushd ../homebrew-macos +git pull +cp ../xcodeinstall/scripts/xcodeinstall.rb . git add xcodeinstall.rb git commit --quiet -m "update for $TAG" git push --quiet > /dev/null 2>&1