packages icon indicating copy to clipboard operation
packages copied to clipboard

Distributing packagesbuild cli tool via Homebrew?

Open JanosGit opened this issue 5 years ago • 4 comments

I'm currently setting up a CI pipeline via GitHub Actions for one of my projects that uses Packages to build the macOS installer. To use packagebuild during that process, I currently have to download it via wget, mount the dmg and install it from there with root rights. All that would be quite straightforward if I could just do brew install packagesbuild. Is it possible to make packagesbuild accessible through Homebrew?

JanosGit avatar Dec 31 '20 17:12 JanosGit

packagesbuild is just a command line tool version of the Build command of the main application. As such, it just sends build orders and receives build progress events.

You would actually need to install all the following items:

/Library/Application Support/fr.whitebox.packages/Licenses Templates /Library/LaunchDaemons/fr.whitebox.packages.build.dispatcher.plist /Library/PrivilegedHelperTools/fr.whitebox.packages /usr/local/bin/goldin /usr/local/bin/packagesbuild

packagesdev avatar Jan 04 '21 20:01 packagesdev

@packagesdev by that do you mean

~/Library/..........

or

/Library/...........

TheTechRobo avatar Jan 04 '21 20:01 TheTechRobo

So do I get it right that these install paths are not really compatible with Homebrew-based distribution? Let me maybe ask the question differently: What would be the proposed straightforward approach to use packages in a CI runner environment like GitHub Actions, @packagesdev? Currently I do it manually like this, which will obviously break as soon as there is packages version number update and I think there has to be a better approach. Ideally even without the need for root rights during the process.

       - name: Download Packages installer build tool
          run: wget http://s.sudre.free.fr/Software/files/Packages.dmg

        - name: Mount Packages image
          run: hdiutil attach Packages.dmg

        - name: Install Packages
          run: sudo installer -pkg /Volumes/Packages\ 1.2.9/Install\ Packages.pkg -target /

       - name: Build installer
          run: packagesbuild myProject.pkgproj

Still thank you for building such a great tool. I'm also willing to contribute in some way to build a convenient solution in case it's in the scope of my skillset :)

JanosGit avatar Jan 08 '21 11:01 JanosGit