Skip to content

Commit

Permalink
update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sebsto committed Oct 21, 2022
1 parent 0958432 commit 86dafec
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/RELEASE_DOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/bottle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]}

Expand Down
4 changes: 2 additions & 2 deletions scripts/build_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_fat_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
5 changes: 3 additions & 2 deletions scripts/release_sources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 86dafec

Please sign in to comment.