Merge pull request #7091 from EricFromCanada/version-stable

version: handle -stable in tag
This commit is contained in:
Mike McQuaid 2020-03-02 13:20:58 +00:00 committed by GitHub
commit 15d274bab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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

View File

@ -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