Homebrew install specific version of formula?
- Go to homebrew git repo: https://github.com/Homebrew/homebrew-core/
- Identify the commit specific to kubernetes 1.11.x version
- Go to
Formula
folder - Open raw version of
kubernetes-cli.rb
file - Copy the raw link of the file
https://raw.githubusercontent.com/Homebrew/homebrew-core/3e8f5503dde7069c5ff49b82d5e1576e6ebe3a5d/Formula/kubernetes-cli.rb
- Run
brew install <raw_link>
I dont have enough rep to make a comment on the answer that helped me. So writing here to be more specific about point 2 from @urpalreloaded
brew search --pull-request [email protected]
- It will say that it did not find the cask but should give you a link to a closed pull request that matches the version you searched for. Follow the link to the pull request and the follow steps 3-5.
brew unlink kubernetes-cli
brew install <raw-link>
FWIW, I think brew doesnt keep versions because it will make the repo too big? This workaround is inconvenient and perhaps they could find a way around this issue on their end?