Skip to content
Snippets Groups Projects
Commit b681d64e authored by EricFromCanada's avatar EricFromCanada
Browse files

version: handle -stable in tag

parent f37cd18e
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment