[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index


From: Kouhei Sutou <kou_at_cozmixng.org>
Date: 2007-04-02 14:18:46 CEST

Hi Joe, DJ,

I wrote a small script that makes .gem.

Joe, could you confirm this script can generate .gem?

> ruby make_gem.rb TARGET_DIRECTORY

TARGET_DIRECTORY is a directory that is generated by
unzip-ing a zip archive for the Ruby bindings.

And could you confirm generated .gem works?

> gem install subversion-1.5.0-mswin32.gem
> ruby -e 'require "svn/core"; p Svn::Core::VERSION'

DJ, could you modify build/win32/make_dist.py to use
make_gem.rb if Joe can confirm the above tow things? I
should modify that but my main environment is not
Windows. I'm so sorry.

I think Windows user doesn't need both of .zip and .gem. If
we provide .gem, we don't need to provide .zip. Joe, what do
you think about?



# -*- ruby -*-

def usage
  puts "#{$0} target_directory"

if ARGV.size < 1
  exit 1

target_dir = ARGV.shift

if target_dir == "--help"

base_dir = File.expand_path(File.join(target_dir, "ruby"))
$LOAD_PATH.unshift(File.join(base_dir, "ext"))
$LOAD_PATH.unshift(File.join(base_dir, "lib"))

require 'svn/core'

gem_file = nil
Dir.chdir(target_dir) do
  require 'rubygems'

  spec = Gem::Specification.new do |s|
    s.name = "subversion"
    s.date = Time.now
    s.version = Svn::Core::VER_NUM
    s.summary = "The Ruby bindings for Subversion."
    s.email = "dev@subversion.tigris.org"
    s.homepage = "http://subversion.tigris.org/"
    s.description = s.summary
    s.authors = ["dev@subversion.tigris.org"]
    s.files = Dir.glob(File.join("**", "*")).delete_if {|x| /\.gem$/i =~ x}
    s.require_paths = ["ruby/ext", "ruby/lib"]
    s.platform = Gem::Platform::WIN32

  gem_file = File.expand_path(Gem::Builder.new(spec).build)
FileUtils.mv(gem_file, File.basename(gem_file))

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 2 14:19:05 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.