8

I am trying to install a specific version of Buck using Homebrew. Facebook provide a formula on GitHub.

I have added the tap:

brew tap facebook/fb

I can then install Buck using:

brew install --HEAD facebook/fb/buck

However, I would like to install a specific release, for example v2017.05.02.01.

What is the syntax for installing a specific release from GitHub?

I am looking for something like:

# This does not work! 
brew install --v2017.05.02.01 facebook/fb/buck

Note: other questions do not seem to be about releases on GitHub.

2 Answers 2

6

Not sure whether this is a good idea or not, but it does seem like you can install from an older commit.

So for example the following command seems to work to download, build and install version 2017.05.02.01 of buck. Note that it will try to download and compile from source because the binaries have been deleted from the repo.

brew install https://raw.githubusercontent.com/facebook/homebrew-fb/7511722fd58e999e5d8c3a415d4e8cd1deee8f21/buck.rb

I got to this by:

  1. Going into the commit history of homebrew-fb
  2. Clicking on the <> button for the "Update buck.rb to v2017.05.02.01" commit to take me into the repository as it existed with that commit
  3. Selecting the buck.rb file
  4. And lastly clicking the "Raw" button to get the url directly to that specific version of the buck.rb
1
  • This is actually the workaround I posted on the Buck issue tracker :)
    – sdgfsdh
    May 10, 2017 at 20:56
1

A more expanded version of the above with a couple additional tricks can be found on StackOverflow.

https://stackoverflow.com/a/53766019/3794873

One thing to keep in mind is that if you are installing an older Formula the Homebrew API/methods may have changed since that time so you should brew edit appFormula against the current version and compare to the brew edit [email protected] if you encounter any errors trying to brew install [email protected] after the brew extract command in the answer linked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .