bundle/brew_installer: strip revision number from version file.
This doesn't make sense for consumption outside of Homebrew.
This commit is contained in:
parent
5105b7077b
commit
f2139c61ed
@ -61,11 +61,12 @@ module Homebrew
|
|||||||
|
|
||||||
if result && @version_file.present?
|
if result && @version_file.present?
|
||||||
# Use the version from the environment if it hasn't changed.
|
# Use the version from the environment if it hasn't changed.
|
||||||
|
# Strip the revision number because it's not part of the non-Homebrew version.
|
||||||
version = if !changed? && (env_version = Bundle.formula_versions_from_env[@name])
|
version = if !changed? && (env_version = Bundle.formula_versions_from_env[@name])
|
||||||
env_version
|
env_version
|
||||||
else
|
else
|
||||||
Formula[@full_name].version.to_s
|
Formula[@full_name].version.to_s
|
||||||
end
|
end.sub(/_\d+$/, "")
|
||||||
version_path = Pathname.new(@version_file)
|
version_path = Pathname.new(@version_file)
|
||||||
version_path.write("#{version}\n")
|
version_path.write("#{version}\n")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user