forked from jruby/activerecord-jdbc-adapter
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile.jdbc
27 lines (22 loc) · 814 Bytes
/
Rakefile.jdbc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# NOTE: shared Rakefile used for jdbc-xxx gems
require 'bundler/gem_helper'
name = Dir["*.gemspec"].first.sub('.gemspec', '')
gem_helper = Bundler::GemHelper.new(Dir.pwd, name)
def gem_helper.version_tag
"#{name}-#{version}" # override "v#{version}"
end
version = gem_helper.send(:version)
version_tag = gem_helper.version_tag
desc "Build #{name}-#{version} gem into the pkg directory"
task('build') { gem_helper.build_gem }
desc "Build and install #{name}-#{version} gem into system gems"
task('install') { gem_helper.install_gem }
desc "Create tag #{version_tag} build and push #{name}-#{version} gem to Rubygems"
task('release') do
gem_helper.instance_eval do
guard_clean
built_gem_path = build_gem
tag_version unless already_tagged?
rubygem_push(built_gem_path) if gem_push?
end
end