From: Jake Farrell Date: Thu, 22 Sep 2011 21:15:02 +0000 (+0000) Subject: Thrift-1354: Add rake task to build just the gem file X-Git-Tag: 0.8.0~76 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=4bd4f0ec259bdf74d78763766b1dc34bf321665b;p=common%2Fthrift.git Thrift-1354: Add rake task to build just the gem file Client: rb Patch: jfarrell Updates ruby build to now build the gem by default and adds a rake task to create the gem. git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1174393 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/Makefile.am b/lib/rb/Makefile.am index a3ea9750..0f103579 100644 --- a/lib/rb/Makefile.am +++ b/lib/rb/Makefile.am @@ -31,7 +31,7 @@ EXTRA_DIST = \ DESTDIR ?= / all-local: - $(RAKE) build_ext + $(RAKE) install-exec-hook: $(RAKE) install diff --git a/lib/rb/Rakefile b/lib/rb/Rakefile index 8004733c..780d6520 100644 --- a/lib/rb/Rakefile +++ b/lib/rb/Rakefile @@ -24,7 +24,7 @@ require 'spec/rake/spectask' THRIFT = '../../compiler/cpp/thrift' -task :default => [:spec] +task :default => [:gem] task :spec => [:'gen-rb', :realspec] Spec::Rake::SpecTask.new(:realspec) do |t| @@ -85,12 +85,16 @@ task :benchmark do ruby 'benchmark/benchmark.rb' end -desc 'Generate and install the thrift gem' -task :install => [:spec, :build_ext] do +desc 'Builds the thrift gem' +task :gem => [:spec, :build_ext] do unless sh 'gem', 'build', 'thrift.gemspec' $stderr.puts "Failed to build thrift gem" break end +end + +desc 'Install the thrift gem' +task :install => [:gem] do unless sh 'gem', 'install', 'thrift-*.gem' $stderr.puts "Failed to install thrift gem" break