Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update next_minor_version method

  • Loading branch information...
commit d528d884bd8813ef715f36c36dcd8d8ec7c7ec0d 1 parent 017bade
@potomak potomak authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 lib/tasks/tomatoes.rake
View
12 lib/tasks/tomatoes.rake
@@ -61,9 +61,15 @@ def version
end
def next_minor_version
- TomatoesApp::VERSION.split('.').map do |n|
- 2 == TomatoesApp::VERSION.split('.').index(n) ? n.to_i+1 : n
- end.join('.')
+ version_array = TomatoesApp::VERSION.split('.')
+
+ if version_array.size > 2
+ version_array[2] = version_array[2].to_i+1
+ else
+ version_array[2] = 1
+ end
+
+ version_array.join('.')
end
def read_file(filename)
Please sign in to comment.
Something went wrong with that request. Please try again.