diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/upgrader.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/upgrader.rb b/lib/upgrader.rb index 3dff6a8..3969fa2 100644 --- a/lib/upgrader.rb +++ b/lib/upgrader.rb @@ -41,8 +41,6 @@ class Upgrader end def latest_version_raw - git_tags = `git ls-remote --tags origin | grep tags\/v#{current_version.major}` - git_tags = git_tags.lines.to_a.select { |version| version =~ /v\d\.\d\.\d\Z/ } last_tag = git_tags.last.match(/v\d\.\d\.\d/).to_s end @@ -91,4 +89,9 @@ class Upgrader end while !choices.include?(answer) answer end + + def git_tags + tags = `git ls-remote --tags origin | grep tags\/v#{current_version.major}` + tags.lines.to_a.select { |version| version =~ /v\d\.\d\.\d\Z/ } + end end |