Repository navigation
Add macOS pkg installer #7554
Description
Activity
- addeddiscussFeature changes that require discussion primarily among the GitHub CLI teamFeature changes that require discussion primarily among the GitHub CLI teamand removedneeds-triageneeds to be reviewedneeds to be reviewed
on Jun 8, 2023 In the PR I also implemented an "build & sign" option for production build of the pkg installer which would also sign the installer.
I could not use the already existingsignscript because to sign a pkg installer you needproductsignorproductbuild --signand a different developer ID for the sign parameter (if I remember correctly)Hi @paulober, thanks for opening this enhancement request and doing the work on the associated PR. As per our Contributing Policy we don't accept PRs for work we haven't discussed.
I'm going to mark this with a
discusslabel so we can talk about it as a team, and if we're happy with the idea we'll review your approach. Again, thank you for spending the time on the PR.In the meantime, just so I understand, your current approach for installing on MacOS is to download the release artifact from GitHub, to unzip and use that for installation, correct? And this approach will use the MacOS installation process to automate that, and also set up autocompletions for
zsh? (FWIW, if you install via homebrew you get this, but I understand not everyone wants to install that way).Cheers!
Hi @williammartin,
I'm glad that the approach of creating a macOS installer package will be discussed. Currently, I manually install the macOS arm64 artifact by downloading and copying the contents to the desired location.
By creating a macOS installer package (.pkg file), we can bundle the binary, man pages, and zsh autocompletion script in a structured and standardized manner. This package serves as a Mac equivalent of a deb package on Linux, simplifying the installation process.
An advantage of this approach is its compatibility with both Intel and Apple Silicon Macs. The package contains a macOS universal binary, allowing seamless installation on both architectures without requiring user intervention. I decided to use the Universal Binary feature as this also simplifies the installation package structure and reduces the resulting artifacts count.
If you have any further questions, please let me know.
Reacted by William MartinHere is the installer for the current v2.30.0 release as a showcase:
gh_2.30.0_macOS_universal.pkg.zip(it's only compressed again to upload it here)I'm curious why
homebrewfalls short for installing the GitHub CLI?Overall I'm worried about maintaining a pkg installer moving forward.
- Homebrew would be the only option for macOS guys if they won't manually install the files and on Windows and Linux are installers independent from repositories or maintainers available for direct download on GitHub
- On some systems in companies you can request a certain application to be installed on your dev box. Pkg can be easily distributed and updated thought deployment systems but homebrew would be special and you would have another different party on your system
- Homebrew messes with the Xcode command line tools installation: It often overrides the command line tools provided by Xcode or changes something. Also it spreads around on the system and from a security kind of perspective as a third party system with permission to install stuff...
Also, the pkg installer would be also build by the CI and it really only copies a file structure you put into it on the target machine. So for example payload/usr/local/bin/gh would make the installer moving gh into /usr/local/bin. Just change the path and it moves it somewhere else.
But I can understand the concern of having to care about an additional distribution package and I can just say, I think there are many macOS devs which would appreciate the option to install gh cli with an pkg installer...(sry for my English, I'm not a native speaker)
@williammartin Any updates on this?
@paulober sorry for the delay and thank you for the additional information. We discussed it and we think it's a reasonable enhancement but from our side we need to do a little more investigation into the maintenance burden to support this before committing. Note that I'm not saying it requires too much maintenance, just that no one on the team has experience with MacOS pkg installers and we don't want to commit to something we don't have a good understanding of.
I'll update you on this issue once we've had time to do the necessary investigation. Thanks!
Homebrew has messed up my system in the past and I must avoid using it for reasons. It would be nice if the downloaded zip at least gave some directions as to where I'm supposed to place the downloaded folder: gh_2.31.0_macOS_amd64
Apologies if it's a dumb question. Thank you.
Reacted by Neema@annie-maria Exactly why we need a pkg installer. I build for my self a pkg for the current release (it's also signed):
gh_v2.31.0_macOS_universal.pkg.zip
It does only auto copy the files from the zip + zsh completions into /usr/local/bin /usr/local/shareReacted by annie-maria and rugo2001xdReacted by rugo2001xd- removeddiscussFeature changes that require discussion primarily among the GitHub CLI teamFeature changes that require discussion primarily among the GitHub CLI team
on Oct 31, 2023 3 remaining items
Some more evidence that this could be useful #9100
- added a commit that references this issue
on May 24, 2024
Describe the feature or problem you’d like to solve
Also build a pkg installer for macOS like for example Python and Go have so developers on macOS don't have to install the zip manually.
Proposed solution
A more simple and faster installation process for macOS developers with the addition of zsh autocompletion support which was linux exclusive before.
Additional context
I'll assign my self to develop this so you don't have to as I rely want to see this feature.