Formula#pkg_version: return the result based on current active_spec
This commit is contained in:
parent
78442232d0
commit
5aa6b5c5fa
@ -67,9 +67,6 @@ class Formula
|
|||||||
# @see #active_spec
|
# @see #active_spec
|
||||||
attr_reader :active_spec_sym
|
attr_reader :active_spec_sym
|
||||||
|
|
||||||
# The {PkgVersion} for this formula with version and {#revision} information.
|
|
||||||
attr_reader :pkg_version
|
|
||||||
|
|
||||||
# Used for creating new Homebrew versions of software without new upstream
|
# Used for creating new Homebrew versions of software without new upstream
|
||||||
# versions.
|
# versions.
|
||||||
# @see .revision
|
# @see .revision
|
||||||
@ -118,7 +115,6 @@ class Formula
|
|||||||
:stable
|
:stable
|
||||||
end
|
end
|
||||||
validate_attributes!
|
validate_attributes!
|
||||||
@pkg_version = PkgVersion.new(version, revision)
|
|
||||||
@build = active_spec.build
|
@build = active_spec.build
|
||||||
@pin = FormulaPin.new(self)
|
@pin = FormulaPin.new(self)
|
||||||
end
|
end
|
||||||
@ -207,6 +203,11 @@ class Formula
|
|||||||
active_spec.version
|
active_spec.version
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# The {PkgVersion} for this formula with {version} and {#revision} information.
|
||||||
|
def pkg_version
|
||||||
|
PkgVersion.new(version, revision)
|
||||||
|
end
|
||||||
|
|
||||||
# A named Resource for the currently active {SoftwareSpec}.
|
# A named Resource for the currently active {SoftwareSpec}.
|
||||||
def resource(name)
|
def resource(name)
|
||||||
active_spec.resource(name)
|
active_spec.resource(name)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user