This gem plugin adds a bootstrap, bump, tag and a release command to the rubygems gem command.
The bump command
- bumps the version number defined in
lib/[gem_name]/version.rbto the next major, minor or patch level or to a given, particular version number
The tag command
- executes
git tag -am 'tag [tag_name]' [tag_name]and - executes
git push --tags origin
… with tag_name being the version number as specified in your .gemspec preceeded by v (e.g. v0.0.1).
The release command
- builds a gem from your gemspec and
- pushes it to rubygems.org
- deletes the gem file
- optionally invokes the
tagcommand
The gemspec command
- generates an initial
[gem_name].gemspecfile with sane defaults (will overwrite an existing gemspec)
The bootstrap command
- generates an initial
[gem_name].gemspecfile with sane defaults - optionally scaffolds:
lib/[gem_name]/version.rb,README,test/ - optionally inits a git repo, creates it on github and pushes it to github (requires git config for
github.userandgithub.tokento be set)
Obviously …
$ gem install gem-release
$ gem release your.gemspec # builds the gem and pushes it to rubygems.org
$ gem release # uses the first *.gemspec in the current working directory
$ gem release --tag # also executes gem tag
$ gem tag # creates a git tag and pushes tags to the origin repository
$ gem gemspec # generates a [gem_name].gemspec using `git ls-files {app,lib}`.split("\n")
$ gem gemspec --strategy glob # uses s.files = Dir['{lib/**/*,[A-Z]*}']
$ gem bootstrap
$ gem bootstrap --scaffold # scaffolds lib/[gem_name]/version.rb, README, test/
$ gem bootstrap --github # inits a git repo, creates it on github and pushes it to github
# (requires git config for github.user and github.token to be set)
$ gem bump # Bump the gem version to the next patch level (e.g. 0.0.1 to 0.0.2)
$ gem bump --to minor # Bump the gem version to the next minor level (e.g. 0.0.1 to 0.1.0)
$ gem bump --to major # Bump the gem version to the next major level (e.g. 0.0.1 to 1.0.0)
$ gem bump --to 1.1.1 # Bump the gem version to the given version number
$ gem bump --push # Bump and git push to origin
If you don’t specify a gemspec filename the first *.gemspec file found in your current working directory will be used.