diff options
| author | Zhiming Wang | 2016-12-06 17:30:10 -0500 |
|---|---|---|
| committer | Zhiming Wang | 2016-12-06 17:30:10 -0500 |
| commit | 417f27f40f112bdc228b9f2ab27fef8cea7c7d97 (patch) | |
| tree | f6e13b39a125600d7242ef4ce785ff6c934f4a31 /Library | |
| parent | 11cf7b97c419312d72945a174e1a57d51f1a1787 (diff) | |
| download | brew-417f27f40f112bdc228b9f2ab27fef8cea7c7d97.tar.bz2 | |
bump-formula-pr: use correct version in download
When a --version is specified, use this specified version in the name of
the downloaded file rather than the default that is parsed from the URL.
For instance,
brew bump-formula-pr --devel \
--url=http://www.zsh.org/pub/development/zsh-5.2-test-2.tar.gz \
--version=5.2-test-2 zsh
should download to $HOMEBREW_CACHE/zsh-5.2-test-2.tar.gz (correct
behavior after this commit) rather than
$HOMEBREW_CACHE/zsh-2.tar.gz (wrong behavior before this commit).
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/dev-cmd/bump-formula-pr.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index c16165b88..b1f851b8d 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -134,6 +134,7 @@ module Homebrew rsrc = Resource.new { @url = rsrc_url } rsrc.download_strategy = CurlDownloadStrategy rsrc.owner = Resource.new(formula.name) + rsrc.version = forced_version if forced_version rsrc_path = rsrc.fetch if Utils.popen_read("/usr/bin/tar", "-tf", rsrc_path) =~ %r{/.*\.} new_hash = rsrc_path.sha256 |
