Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💪🏼 Add arm64_big_sur to bottle script #342

Merged
merged 5 commits into from
Mar 30, 2021
Merged

💪🏼 Add arm64_big_sur to bottle script #342

merged 5 commits into from
Mar 30, 2021

Conversation

phatblat
Copy link
Member

@phatblat phatblat commented Mar 29, 2021

Made the bottle script smarter using uname -m and sw_vers -productVersion to pick between arm64_big_sur, big_sur and catalina.

↪ script/bottle
CURRENT_OS_VERSION_MAJOR: 11
CURRENT_OS_VERSION_MINOR: 2
CURRENT_PLATFORM: big_sur
Unlinking /usr/local/Cellar/mas/1.8.1... 0 symlinks removed.
==> 🍼 Bottling mas 1.8.1 for: arm64_big_sur big_sur catalina mojave high_sierra sierra el_capitan
Warning: mas 1.8.1 is already installed, it's just not linked.
To link this version, run:
  brew link mas
git config --replace-all homebrew.devcmdrun true
==> Bottling mas--1.8.1.big_sur.bottle.tar.gz...
tar cf /Users/phatblat/dev/mas-cli/mas/mas--1.8.1.big_sur.bottle.tar mas/1.8.1
gzip -f mas-bottle.tar
==> Detecting if mas--1.8.1.big_sur.bottle.tar.gz is relocatable...
./mas--1.8.1.big_sur.bottle.tar.gz
  bottle do
    root_url "https://dl.bintray.com/phatblat/mas-bottles"
    sha256 cellar: :any, big_sur: "156c5065283e70298a1e2484e2f5db88a2469b52ae3eba782f09d461215e4195"
  end
'mas--1.8.1.big_sur.bottle.tar.gz' -> '/Users/phatblat/dev/mas-cli/mas/build/bottles/mas-1.8.1.arm64_big_sur.bottle.tar.gz'
'mas--1.8.1.big_sur.bottle.tar.gz' -> '/Users/phatblat/dev/mas-cli/mas/build/bottles/mas-1.8.1.big_sur.bottle.tar.gz'
'mas--1.8.1.big_sur.bottle.tar.gz' -> '/Users/phatblat/dev/mas-cli/mas/build/bottles/mas-1.8.1.catalina.bottle.tar.gz'
'mas--1.8.1.big_sur.bottle.tar.gz' -> '/Users/phatblat/dev/mas-cli/mas/build/bottles/mas-1.8.1.mojave.bottle.tar.gz'
'mas--1.8.1.big_sur.bottle.tar.gz' -> '/Users/phatblat/dev/mas-cli/mas/build/bottles/mas-1.8.1.high_sierra.bottle.tar.gz'
'mas--1.8.1.big_sur.bottle.tar.gz' -> '/Users/phatblat/dev/mas-cli/mas/build/bottles/mas-1.8.1.sierra.bottle.tar.gz'
'mas--1.8.1.big_sur.bottle.tar.gz' -> '/Users/phatblat/dev/mas-cli/mas/build/bottles/mas-1.8.1.el_capitan.bottle.tar.gz'
total 29568
-rw-r--r-- 1 phatblat staff 3964480 Mar 28 21:42 mas-1.8.1.arm64_big_sur.bottle.tar.gz
-rw-r--r-- 1 phatblat staff 3964480 Mar 28 21:42 mas-1.8.1.big_sur.bottle.tar.gz
-rw-r--r-- 1 phatblat staff 3964480 Mar 28 21:42 mas-1.8.1.catalina.bottle.tar.gz
-rw-r--r-- 1 phatblat staff 3964480 Mar 28 21:42 mas-1.8.1.el_capitan.bottle.tar.gz
-rw-r--r-- 1 phatblat staff 3964480 Mar 28 21:42 mas-1.8.1.high_sierra.bottle.tar.gz
-rw-r--r-- 1 phatblat staff 3964480 Mar 28 21:42 mas-1.8.1.mojave.bottle.tar.gz
-rw-r--r-- 1 phatblat staff 3964480 Mar 28 21:42 mas-1.8.1.sierra.bottle.tar.gz

Fixes #333

@phatblat phatblat added this to the Unreleased milestone Mar 29, 2021
Copy link
Contributor

@chris-araman chris-araman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, or maybe in some future work, we could build only arm64 for arm64_* and only x86_64 for the non-arm64_ OS_VERSIONS instead of building universal binaries for everything. That seems to be the direction Homebrew decided to take.

Copy link
Contributor

@chris-araman chris-araman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved too soon. I think we need the uname -m change.

@phatblat
Copy link
Member Author

I snuck in an OS version check that I've only tested on an Intel Big Sur box. Wanted catalina support so that we can use GitHub Actions runners to build bottles on release until I get an M1 mini for that.

Only big_sur and catalina allowed
@phatblat
Copy link
Member Author

Good idea about building non-universal binaries. That would certainly reduce the size of bottles. Bintray is sunsetting their free package hosting and I'm going to be looking into moving the custom mas tap to GitHub packages but haven't looked to see what sort of space requirements that will need. The current universal bottles are about 4MB each. With 7 platforms (cpu+os) supported that's 21MB per release.

chris-araman
chris-araman previously approved these changes Mar 29, 2021
Copy link
Contributor

@chris-araman chris-araman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. I wonder if we could simplify by globbing * for ${CURRENT_PLATFORM}.

@phatblat phatblat merged commit a4db26b into master Mar 30, 2021
@phatblat phatblat deleted the arm-bottle branch March 30, 2021 04:26
@phatblat phatblat modified the milestones: Unreleased, 1.8.2 Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for arm64_big_sur
2 participants