brew info [formula name]
and look for From:
to get url of current formula
$ brew info heroku
heroku: stable 6.15.24 (bottled), HEAD
Command-line client for the cloud PaaS
https://cli.heroku.com
/usr/local/Cellar/heroku/3.42.10 (985 files, 6.2MB)
Built from source on 2015-10-07 at 17:33:25
/usr/local/Cellar/heroku/3.42.20 (985 files, 6.2MB)
Built from source on 2015-11-24 at 11:11:11
/usr/local/Cellar/heroku/3.42.22 (985 files, 6.2MB)
Built from source on 2015-11-24 at 11:12:26
/usr/local/Cellar/heroku/3.43.2 (993 files, 6.2MB)
Built from source on 2016-07-22 at 09:31:30
/usr/local/Cellar/heroku/6.11.3 (6,922 files, 73.1MB) *
Built from source on 2017-08-04 at 10:33:41
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/heroku.rb
==> Dependencies
Required: node ✘
==> Options
--HEAD
Install HEAD version
- Go to:
https://github.com/Homebrew/homebrew-core/blob/master/Formula/[formula name].rb
example
- Click "History" example
- Find commit with version number you want. Usually the commit messages will have version numbers in them, if not, sorry. example
- Click "View" to view the formula.rb file at that commit example
- Click "Raw" to get direct link to file example
- Install using url to the formula.rb you want to use:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/15dde21700bd71e98eb0ba4afdf652f64063bbce/Formula/heroku.rb