lib/thor-scmversion.rb in thor-scmversion-0.3.1 vs lib/thor-scmversion.rb in thor-scmversion-1.0.0
- old
+ new
@@ -1,19 +1,21 @@
require 'pathname'
require 'tmpdir'
require 'thor'
+require 'thor-scmversion/prerelease'
require 'thor-scmversion/scm_version'
require 'thor-scmversion/git_version'
require 'thor-scmversion/p4_version'
require 'thor-scmversion/shell_utils'
+require 'thor-scmversion/errors'
module ThorSCMVersion
class Tasks < Thor
namespace "version"
- desc "bump TYPE", "Bump version number (type is major, minor, patch or auto)"
- def bump(type)
- current_version.bump! type
+ desc "bump TYPE [PRERELEASE_TYPE]", "Bump version number (type is major, minor, patch, prerelease or auto)"
+ def bump(type, prerelease_type = nil)
+ current_version.bump! type, prerelease_type
begin
say "Creating and pushing tags", :yellow
current_version.tag
say "Writing files: #{version_files.join(', ')}", :yellow
write_version