Skip to content

Commit e243105

Browse files
committed
try to fix deploy script
1 parent 47ffc2a commit e243105

File tree

3 files changed

+35
-24
lines changed

3 files changed

+35
-24
lines changed

scripts/simple-deploy/delete_release.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#!/bin/sh -e
22

3-
VERSION_TO_DELETE=$(cat VERSION)
4-
TAG=v$VERSION_TO_DELETE
3+
VERSION="$1"
4+
if [ -z "$VERSION" ]; then
5+
echo "Usage: $0 <version>"
6+
echo "Example: $0 0.15.0"
7+
exit 1
8+
fi
9+
TAG="v$VERSION"
10+
echo "🚀 Deleting version $VERSION"
511

612
gh release delete $TAG
713
git tag -d $TAG

scripts/simple-deploy/release.sh

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,24 @@ gh release create "$TAG" --generate-notes
3737
echo "📦 Creating bottle files"
3838
mkdir -p bottles
3939

40-
# Create bottles for each platform
41-
for platform in arm64_ventura arm64_sonoma arm64_sequoia arm64_tahoe ventura sonoma sequoia tahoe; do
42-
bottle_name="xcodeinstall-$VERSION.$platform.bottle.tar.gz"
43-
mkdir -p "xcodeinstall/$VERSION/bin"
44-
mkdir -p "xcodeinstall/$VERSION/.brew"
45-
cp .build/apple/Products/Release/xcodeinstall "xcodeinstall/$VERSION/bin/"
46-
cp LICENSE "xcodeinstall/$VERSION/" 2>/dev/null || true
47-
cp README.md "xcodeinstall/$VERSION/" 2>/dev/null || true
48-
echo '{"homebrew_version":"4.0.0","used_options":[],"unused_options":[],"built_as_bottle":true,"poured_from_bottle":false,"loaded_from_api":true,"installed_as_dependency":false,"installed_on_request":true,"changed_files":[],"time":null,"source_modified_time":null,"compiler":"clang","aliases":[],"runtime_dependencies":[],"source":{"tap":"sebsto/macos","spec":"stable","versions":{"stable":"'$VERSION'","version_scheme":0}}}' > "xcodeinstall/$VERSION/INSTALL_RECEIPT.json"
49-
tar -czf "bottles/$bottle_name" xcodeinstall
50-
rm -rf xcodeinstall
51-
done
40+
# Create one bottle and reuse it for all platforms
41+
bottle_name="xcodeinstall-$VERSION.arm64_ventura.bottle.tar.gz"
42+
mkdir -p "xcodeinstall/$VERSION/bin"
43+
mkdir -p "xcodeinstall/$VERSION/.brew"
44+
cp .build/apple/Products/Release/xcodeinstall "xcodeinstall/$VERSION/bin/"
45+
cp LICENSE "xcodeinstall/$VERSION/" 2>/dev/null || true
46+
cp README.md "xcodeinstall/$VERSION/" 2>/dev/null || true
47+
echo '{"homebrew_version":"4.0.0","used_options":[],"unused_options":[],"built_as_bottle":true,"poured_from_bottle":false,"loaded_from_api":true,"installed_as_dependency":false,"installed_on_request":true,"changed_files":[],"time":null,"source_modified_time":null,"compiler":"clang","aliases":[],"runtime_dependencies":[],"source":{"tap":"sebsto/macos","spec":"stable","versions":{"stable":"'$VERSION'","version_scheme":0}}}' > "xcodeinstall/$VERSION/INSTALL_RECEIPT.json"
48+
tar -czf "bottles/$bottle_name" xcodeinstall
49+
rm -rf xcodeinstall
5250

5351
# Get bottle SHA256
54-
BOTTLE_SHA=$(shasum -a 256 "bottles/xcodeinstall-$VERSION.arm64_ventura.bottle.tar.gz" | awk '{print $1}')
52+
BOTTLE_SHA=$(shasum -a 256 "bottles/$bottle_name" | awk '{print $1}')
53+
54+
# Copy the same bottle for all platforms
55+
for platform in arm64_sonoma arm64_sequoia arm64_tahoe sonoma sequoia tahoe; do
56+
cp "bottles/$bottle_name" "bottles/xcodeinstall-$VERSION.$platform.bottle.tar.gz"
57+
done
5558

5659
# Upload bottles
5760
gh release upload "$TAG" bottles/*

xcodeinstall.rb

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
class Xcodeinstall < Formula
22
desc "This is a command-line tool to download and install Apple's Xcode"
33
homepage "https://github.com/sebsto/xcodeinstall"
4-
url "https://github.com/sebsto/xcodeinstall/archive/refs/tags/v0.14.2.tar.gz"
5-
sha256 "e085132fc3edd2f413c9aab645d9d03d14accd4e71ecb828d274f07b3a862041"
4+
url "https://github.com/sebsto/xcodeinstall/archive/refs/tags/v0.14.4.tar.gz"
5+
sha256 "d8fd8a06b996f0112a7ffb0ae84b45b0493d760203b23984e5bec6794bf92281"
66
license "Apache-2.0"
77

88
bottle do
9-
root_url "https://github.com/sebsto/xcodeinstall/releases/download/v0.14.2"
10-
sha256 cellar: :any_skip_relocation, arm64_ventura: "d3fe108f55ebadd843a7ffc4e45f52cf916014d7f57aeddcfea6058783e425ac"
11-
sha256 cellar: :any_skip_relocation, arm64_sonoma: "d3fe108f55ebadd843a7ffc4e45f52cf916014d7f57aeddcfea6058783e425ac"
12-
sha256 cellar: :any_skip_relocation, arm64_sequoia: "d3fe108f55ebadd843a7ffc4e45f52cf916014d7f57aeddcfea6058783e425ac"
13-
sha256 cellar: :any_skip_relocation, ventura: "d3fe108f55ebadd843a7ffc4e45f52cf916014d7f57aeddcfea6058783e425ac"
14-
sha256 cellar: :any_skip_relocation, sonoma: "d3fe108f55ebadd843a7ffc4e45f52cf916014d7f57aeddcfea6058783e425ac"
15-
sha256 cellar: :any_skip_relocation, sequoia: "d3fe108f55ebadd843a7ffc4e45f52cf916014d7f57aeddcfea6058783e425ac"
9+
root_url "https://github.com/sebsto/xcodeinstall/releases/download/v0.14.4"
10+
sha256 cellar: :any_skip_relocation, arm64_ventura: "19a7fd744e99dccef30c02b19e4d394c72ee5dc14e3527991ce5472b9c5368e3"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "19a7fd744e99dccef30c02b19e4d394c72ee5dc14e3527991ce5472b9c5368e3"
12+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "19a7fd744e99dccef30c02b19e4d394c72ee5dc14e3527991ce5472b9c5368e3"
13+
sha256 cellar: :any_skip_relocation, arm64_tahoe: "19a7fd744e99dccef30c02b19e4d394c72ee5dc14e3527991ce5472b9c5368e3"
14+
sha256 cellar: :any_skip_relocation, ventura: "19a7fd744e99dccef30c02b19e4d394c72ee5dc14e3527991ce5472b9c5368e3"
15+
sha256 cellar: :any_skip_relocation, sonoma: "19a7fd744e99dccef30c02b19e4d394c72ee5dc14e3527991ce5472b9c5368e3"
16+
sha256 cellar: :any_skip_relocation, sequoia: "19a7fd744e99dccef30c02b19e4d394c72ee5dc14e3527991ce5472b9c5368e3"
17+
sha256 cellar: :any_skip_relocation, tahoe: "19a7fd744e99dccef30c02b19e4d394c72ee5dc14e3527991ce5472b9c5368e3"
1618
end
1719

1820
def install

0 commit comments

Comments
 (0)