Install grails 1.3.7 (or any other specific version) using Homebrew

How do you install a specific version of formulas in Homebrew? - in my case; Grails 1.3.7

+6
source share
2 answers

Update:

As pointed out by akst, homebrew removed the versions command, so this original method is no longer possible.

If you really want to, you can use brew log grails instead of brew versions grails to find the git SHA for the old version of Grails. The formula is now also in a deeper directory structure, so I would recommend using find . -name grails.rb -execdir git checkout <YOUR SHA HERE> {} \; find . -name grails.rb -execdir git checkout <YOUR SHA HERE> {} \;

However, I recommend using the fantastic SDKMAN! for version control of Grails (and other languages ​​/ frameworks!).

Old answer:

Go to the brew database,

 cd $(brew --prefix) 

specify grails versions,

 brew versions grails 

select the desired version (1.3.7)

 git checkout 232acd0 $(brew --prefix)/Library/Formula/grails.rb 

and now install as usual

 brew install grails 

which will install version 1.3.7

+18
source

Rob Brinkman offers a bit more about this approach: http://blog.jdriven.com/2012/09/quick-tip-installing-a-specific-grails-version-on-os-x-using-homebrew/

Paraphrasing here:

 brew unlink grails brew versions grails cd `brew --prefix` git checkout <some hash> <path to formula, ie /usr/local/Library/Formula/grails.rb> brew install grails # install grails git checkout -- /usr/local/Library/Formula/grails.rb # reset formula 
+2
source

Source: https://habr.com/ru/post/917461/


All Articles