Skip to content

Commit

Permalink
Use command for bump_patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
technicalpickles committed Mar 3, 2009
1 parent f6cdbdc commit 6d0505b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions lib/jeweler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,13 @@ def install_gem
#
# 1.5.1 -> 1.5.2
def bump_patch_version(options = {})
options = version_writing_options(options)

@version.bump_patch
@version.write
command = Jeweler::Commands::Version::BumpPatch.new
command.repo = @repo
command.version_helper = @version
command.gemspec = @gemspec
command.commit = true

commit_version if options[:commit]
command.run
end

# Bumps the minor version.
Expand Down
6 changes: 3 additions & 3 deletions lib/jeweler/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ def define

namespace :bump do
desc "Bump the gemspec by a major version."
task :major => ['VERSION.yml', :display] do
task :major => ['VERSION.yml', :version] do
@jeweler.bump_major_version
$stdout.puts "Updated version: #{@jeweler.version}"
end

desc "Bump the gemspec by a minor version."
task :minor => ['VERSION.yml', 'version:display'] do
task :minor => ['VERSION.yml', :version] do
@jeweler.bump_minor_version
$stdout.puts "Updated version: #{@jeweler.version}"
end

desc "Bump the gemspec by a patch version."
task :patch => ['VERSION.yml', 'version:display'] do
task :patch => ['VERSION.yml', :version] do
@jeweler.bump_patch_version
$stdout.puts "Updated version: #{@jeweler.version}"
end
Expand Down

0 comments on commit 6d0505b

Please sign in to comment.