Skip to content

Commit

Permalink
fix(validation): do not validate version for 0.1.0
Browse files Browse the repository at this point in the history
New gems should be released with version 0.1.0
More info see there rails/rails#21258
  • Loading branch information
artofhuman committed Jan 12, 2016
1 parent 9f70529 commit 987c179
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/apress/gems/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,12 @@ def commit
end

def validate_version
return if version == '0.0.1'
fail "New gems should be released with version 0.1.0" if Gem::Version.new(version) < Gem::Version.new("0.1.0")

return if version == '0.1.0'
return if Gem::Version.new(version) > Gem::Version.new(find_version)
raise 'New version less then current version'

fail 'New version less then current version'
end

# run +cmd+ in subprocess, redirect its stdout to parent's stdout
Expand Down

0 comments on commit 987c179

Please sign in to comment.