Skip to content

Commit

Permalink
Add shortcuts for rake tasks
Browse files Browse the repository at this point in the history
version:bump:minor is *way* too much typing.
  • Loading branch information
mpalmer committed Feb 11, 2014
1 parent d9f9595 commit ff9d8a9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ You will now have the following rake tasks available:
rake version:bump:minor # bump minor version (x.y.z -> x.y+1.0)
rake version:bump:patch # bump patch version (x.y.z -> x.y.z+1)

(Since `version:bump:major` is a lot of typing, there are also shortcuts:
`v:b:major`, `v:b:maj`, `v:b:minor`, `v:b:min`, `v:b:patch`, `v:b:pat`, and
`v:b:p`)

By running any of those, a new tag will be created representing the newly
incremented version number at the current commit. If no tags currently
exist, the previous version will be taken to be `0.0.0` and then incremented
Expand Down
14 changes: 14 additions & 0 deletions lib/git-version-bump/rake-tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,17 @@
end
end
end

namespace :v do
namespace :b do
task :major => "version:bump:major"
task :maj => "version:bump:major"

task :minor => "version:bump:minor"
task :min => "version:bump:minor"

task :patch => "version:bump:patch"
task :pat => "version:bump:patch"
task :p => "version:bump:patch"
end
end

0 comments on commit ff9d8a9

Please sign in to comment.