From b7b2e346d07b7a9453197d0b5f47814c72fb4570 Mon Sep 17 00:00:00 2001 From: Tomas Carnecky Date: Fri, 7 Oct 2011 11:50:37 +0200 Subject: [PATCH] Only store stable release versions Skip release candidates (-rc?) and other releases which are not stable by only allowing [0-9.] in the version string. --- lib/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/version.rb b/lib/version.rb index 0a32e1e..c397287 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -28,7 +28,7 @@ class Version commits = get("/repos/gitster/git/commits", :query => {:sha => maint_sha}).parsed_response commits.each do |commit| message = commit['commit']['message'].split("\n").first - if m = /^Git (.*?)$/.match(message) + if m = /^Git ([0-9.]+)$/.match(message) version = m[1] p commit['sha'] if !Version.first(:version => version)