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).
This commit is contained in:
parent
11cf7b97c4
commit
417f27f40f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user