Skip to content
This repository has been archived by the owner on Sep 4, 2018. It is now read-only.

Distribute on Homebrew? #142

Closed
Ashton-W opened this issue Mar 11, 2014 · 43 comments
Closed

Distribute on Homebrew? #142

Ashton-W opened this issue Mar 11, 2014 · 43 comments

Comments

@Ashton-W
Copy link

No description provided.

@orta
Copy link
Contributor

orta commented Mar 11, 2014

IMO, good idea.

@JFKingsley
Copy link

If nobody else has started with this I can push a formula in a few mins.

@supermarin
Copy link
Collaborator

@JFKingsley if you can make one in a Gist but not push it yet, that'd be awesome

@JFKingsley
Copy link

@supermarin Forked homebrew so I could do some isolated testing, got the install working down pat, however since it doesn't seem you can't run stuff on uninstall i'm having a hard time rm -rf'ing the plugin/extras off the system.

@supermarin
Copy link
Collaborator

I guess you can clone ATZ in Cellar or wherever Brew clones stuff, and symlink in ~/Library.... instead of cloning there.

When uninstalling, you'd unlink then

@JFKingsley
Copy link

Yeah, that would probably work, might need to play around, but the premise is sound.

Let me have a crack at that now, see if it pulls off the desired effect.

@JFKingsley
Copy link

Okay @supermarin, got something. Symlinked, works on install/uninstall, all pretty :3

https://gist.github.com/JFKingsley/f4e126f4d631959e91a2

@Ashton-W
Copy link
Author

👍

@JFKingsley
Copy link

Updated the gist to now use File.join everywhere. Anyone want to test this on their machine to confirm it works?

@JFKingsley
Copy link

Ping @Ashton-W @supermarin

@Ashton-W
Copy link
Author

Worked for me and passed brew audit. Haven't played with formulae before so I could be missing something.

@supermarin
Copy link
Collaborator

@JFKingsley thanks for your work on this, you're awesome!

The only concern I have here is - this is a binary distribution.
Homebrew doesn't like to accept these, so we'd probably need to end up with a brew tap.

Either that or trying to make a formula that fetches & compiles Alcatraz w/ xcodebuild

@Ashton-W
Copy link
Author

I forked it to use ruby methods instead of system like in homebrew/wiki/Formula-Cookbook

https://gist.github.com/Ashton-W/aec58c6fb08f933bb01c could be further rubyfied

@JFKingsley
Copy link

Nice work @Ashton-W!

@supermarin: Well, I could do a version that builds alcatraz if you can specify the build process?

@supermarin
Copy link
Collaborator

make build is all you need to execute :)
It'll copy the plugin by itself. I'm only thinking how to uninstall it, but FileUtils.rm_rf should work IMO

@Ashton-W
Copy link
Author

Do we have source releases?

@supermarin
Copy link
Collaborator

FileUtils.rm_rf '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin'

or

FileUtils.rm_rf File.join(Dir.home, 'Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin')

@supermarin
Copy link
Collaborator

@Ashton-W each release is tagged. take a look at the Releases tab.

EDIT: there's also deploy branch that we're currently using for dogfooded update

@Ashton-W
Copy link
Author

I meant as a link to a tarball, and you are right there is one.

@JFKingsley
Copy link

Okay then, so if @Ashton-W is okay i'll see what I can do to work on a self-building formula.

@Ashton-W
Copy link
Author

homebrew/wiki/Formula-Cookbook#wiki-build-toolchain-selection has a good example of xcode building with checks for xcode being installed

@JFKingsley I'm always OK, go ahead

@JFKingsley
Copy link

So @supermarin, "make build" throws this shiz. https://gist.github.com/JFKingsley/9521044

@Ashton-W
Copy link
Author

I get that locally too, removing xcpretty from the Makefile builds for me (with xcpretty not installed)

I've been playing with the Makefile to make xcpretty used iff installed, i'll post a gist when its working

@Ashton-W
Copy link
Author

@JFKingsley
Copy link

That's perfect, only thing is i'm pulling the 1.0.4 tar gz so that makefile isn't in there.

@JFKingsley
Copy link

In fact, can we allow people to specify an optional path to copy the plugin to instead of the Xcode plugin folder?

@Ashton-W
Copy link
Author

It's up to @supermarin how we deal with the xcpretty dependency.

An environment variable could be used to override the install path, but I wonder if we are complicating things to fit in with Homebrew.

@JFKingsley
Copy link

Mhm. To be honest I think I'll probably just ditch using the makefile and do all the commands inside the formula. I'll knock up a new version once my macbook is back in working order, been playing up with memory consumption recently so it's in for a check up at the Apple store for a day.

@supermarin
Copy link
Collaborator

@JFKingsley yeah that makes sense.

Doing just xcodebuild -project Alcatraz.xcodeproj build should be enough

@JFKingsley
Copy link

Apparently not. Throws a bunch of errors about not being able to sign it

@supermarin
Copy link
Collaborator

oh that makes sense, maybe you need to be a member of OSX developer program

@JFKingsley
Copy link

Yes, but not every person who installs Xcode and tries to use this will be. Let me see if I can do a build without signing it.

@supermarin
Copy link
Collaborator

@JFKingsley you're totally right sir, and you shouldn't be spending your time on this from this point.

Your formula with prebuilt binary looks good and i think it's a better thing in the long run (apple likes to change build stuff).
I'm currently unavailable, but will take a look on this on the weekend / early next week.

@JFKingsley
Copy link

Well @supermarin, I did some fancies and I figured out a way to compile a build with no signing, works fine.

Ima spend my time on this until it's finalised and working properly, no stopping me there :P

@Ashton-W
Copy link
Author

Where did we end up on this?

@JFKingsley
Copy link

I'm not entirely sure, we had one working binary script and I had a working script that installed from source, but I'm not sure if we ever got anywhere

@Ashton-W
Copy link
Author

Could you put up a tap, then people can try it and we can move this along.

@nikolay
Copy link

nikolay commented Apr 15, 2014

Wouldn't Homebrew Cask (http://caskroom.io/) installation be the easiest?

@JFKingsley
Copy link

Possibly, although taps are pretty easy as well. Do you want me to tap the binary download script or the (unfinished) source compile script?

@supermarin
Copy link
Collaborator

@JFKingsley I really appreciate all your work done here - but wouldn't like you to waste more time if we don't end up using it.

Current install script isn't that bad

curl -fsSL https://raw.github.com/supermarin/Alcatraz/master/Scripts/install.sh | sh

and updates are automatic.
Maybe it'd make sense to revisit this when the finish the binary distribution?

cc/ @kattrali @jurre

@JFKingsley
Copy link

Yeah, that would make more sense @supermarin, shall we put this on ice until then?

@mralexgray
Copy link

binary is done, no? can't this get finished/submitted to the home-brew team? would be a vast improvement to the ecosystem.

@kattrali
Copy link
Contributor

Somehow this got lost in the mix, but Alcatraz has been available via brew cask for months.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants