Last active
December 19, 2015 14:09
-
-
Save emjayess/5967506 to your computer and use it in GitHub Desktop.
Managing Grails versions using homebrew package manager for Mac OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find the versions available in homebrew | |
# optionally | |
brew up | |
## ... homebrew refreshes all package information | |
brew versions grails | |
## 2.2.2 git checkout a3fdc1f /usr/local/Library/Formula/grails.rb | |
## 2.2.1 git checkout aa5c440 /usr/local/Library/Formula/grails.rb | |
## 2.2.0 git checkout 5c5b964 /usr/local/Library/Formula/grails.rb | |
## 2.1.3 git checkout d08ef78 /usr/local/Library/Formula/grails.rb | |
## 2.1.2 git checkout f038344 /usr/local/Library/Formula/grails.rb | |
## 2.1.1 git checkout 1bcf5af /usr/local/Library/Formula/grails.rb | |
## 2.1.0 git checkout 0dcf6e7 /usr/local/Library/Formula/grails.rb | |
## 2.0.4 git checkout 624e065 /usr/local/Library/Formula/grails.rb | |
## 2.0.3 git checkout af73ab0 /usr/local/Library/Formula/grails.rb | |
## 2.0.2 git checkout 1015eda /usr/local/Library/Formula/grails.rb | |
## 2.0.1 git checkout 97e8e5a /usr/local/Library/Formula/grails.rb | |
## 2.0.0 git checkout 8c2394b /usr/local/Library/Formula/grails.rb | |
## 1.3.7 git checkout 232acd0 /usr/local/Library/Formula/grails.rb | |
## 1.3.6 git checkout 99b3ce9 /usr/local/Library/Formula/grails.rb | |
## 1.3.5 git checkout 9ae2ee6 /usr/local/Library/Formula/grails.rb | |
## 1.3.4 git checkout 9f1d66f /usr/local/Library/Formula/grails.rb | |
## 1.3.3 git checkout 590ae42 /usr/local/Library/Formula/grails.rb | |
## 1.3.2 git checkout 83f1377 /usr/local/Library/Formula/grails.rb | |
## 1.3.1 git checkout 0005a71 /usr/local/Library/Formula/grails.rb | |
## 1.3.0 git checkout f257bf9 /usr/local/Library/Formula/grails.rb | |
## 1.2.2 git checkout 585ee08 /usr/local/Library/Formula/grails.rb | |
## 1.2.1 git checkout e4b66ce /usr/local/Library/Formula/grails.rb | |
# copy/paste the git command for the desired version; e.g. 2.0.1 | |
git checkout 97e8e5a /usr/local/Library/Formula/grails.rb | |
# then install | |
brew install grails | |
## ==> Downloading http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.0.1.zip | |
## ######################################################################## 100.0% | |
## ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# if a grails version is already installed | |
# present? | |
which grails | |
## /usr/local/bin/grails | |
# which version? | |
brew info grails | |
## grails: stable 2.2.2 | |
## http://grails.org | |
## /usr/local/Cellar/grails/2.2.2 (2131 files, 146M) * | |
## Built from source | |
## https://github.com/mxcl/homebrew/commits/master/Library/Formula/grails.rb | |
## ... | |
# unlink the installed/active version (not necessary to brew remove) | |
brew unlink grails | |
## Unlinking /usr/local/Cellar/grails/2.2.2... 3 links removed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# now the system is ready to switch to and use the desired version | |
brew switch grails 2.0.0 | |
## Cleaning /usr/local/Cellar/grails/2.0.1 | |
## Cleaning /usr/local/Cellar/grails/2.2.2 | |
## 3 links created for /usr/local/Cellar/grails/2.0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hat tip: @jehrhardt -- http://derjan.io/blog/2012/12/11/multiple-versions-of-grails-with-homebrew/