Merge pull request #7091 from EricFromCanada/version-stable
version: handle -stable in tag
This commit is contained in:
commit
15d274bab7
@ -6,7 +6,7 @@ describe Language::Node do
|
||||
describe "#setup_npm_environment" do
|
||||
it "calls prepend_path when node formula exists only during the first call" do
|
||||
node = formula "node" do
|
||||
url "node-test"
|
||||
url "node-test-v1.0"
|
||||
end
|
||||
stub_formula_loader(node)
|
||||
expect(ENV).to receive(:prepend_path)
|
||||
|
||||
@ -686,7 +686,7 @@ describe Version do
|
||||
|
||||
specify "from tag" do
|
||||
expect(described_class.create("1.2.3"))
|
||||
.to be_detected_from("https://github.com/foo/bar.git", tag: "v1.2.3")
|
||||
.to be_detected_from("https://github.com/foo/bar.git", tag: "v1.2.3-stable")
|
||||
end
|
||||
|
||||
specify "beta from tag" do
|
||||
|
||||
@ -336,11 +336,11 @@ class Version
|
||||
return m.captures.first unless m.nil?
|
||||
|
||||
# e.g. https://www.openssl.org/source/openssl-0.9.8s.tar.gz
|
||||
m = /-v?([^-]+)/.match(stem)
|
||||
m = /-v?(\d[^-]+)/.match(stem)
|
||||
return m.captures.first unless m.nil?
|
||||
|
||||
# e.g. astyle_1.23_macosx.tar.gz
|
||||
m = /_([^_]+)/.match(stem)
|
||||
m = /_v?(\d[^_]+)/.match(stem)
|
||||
return m.captures.first unless m.nil?
|
||||
|
||||
# e.g. http://mirrors.jenkins-ci.org/war/1.486/jenkins.war
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user