Skip to content
Browse files

Update next_minor_version method

  • Loading branch information...
1 parent 017bade commit d528d884bd8813ef715f36c36dcd8d8ec7c7ec0d @potomak potomak committed Dec 1, 2011
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)

0 comments on commit d528d88

Please sign in to comment.
Something went wrong with that request. Please try again.