@@ -37,21 +37,24 @@ gh release create "$TAG" --generate-notes
3737echo " 📦 Creating bottle files"
3838mkdir -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
5760gh release upload " $TAG " bottles/*
0 commit comments