1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

make-snapshot: repository options

* tool/make-snapshot: add -svn and -git options to direct the
  repository to export.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-11-10 03:50:47 +00:00
parent d0f02c7fd1
commit a60a7e8112

View file

@ -50,6 +50,7 @@ end
ENV["LC_ALL"] = ENV["LANG"] = "C" ENV["LC_ALL"] = ENV["LANG"] = "C"
SVNURL = URI.parse("http://svn.ruby-lang.org/repos/ruby/") SVNURL = URI.parse("http://svn.ruby-lang.org/repos/ruby/")
GITURL = URI.parse("git://github.com/ruby/ruby.git")
RUBY_VERSION_PATTERN = /^\#define\s+RUBY_VERSION\s+"([\d.]+)"/ RUBY_VERSION_PATTERN = /^\#define\s+RUBY_VERSION\s+"([\d.]+)"/
ENV["VPATH"] ||= "include/ruby" ENV["VPATH"] ||= "include/ruby"
@ -413,7 +414,18 @@ ensure
FileUtils.rm_rf(v) if v and !$exported and !$keep_temp FileUtils.rm_rf(v) if v and !$exported and !$keep_temp
end end
vcs = (VCS.detect($srcdir) rescue nil if $srcdir) || VCS::SVN.new(SVNURL) if [$srcdir, ($svn||=nil), ($git||=nil)].compact.size > 1
abort "#{File.basename $0}: -srcdir, -svn, and -git are exclusive"
end
if $srcdir
vcs = VCS.detect($srcdir)
elsif $svn
vcs = VCS::SVN.new($svn == true ? SVNURL : URI.parse($svn))
elsif $git
vcs = VCS::GIT.new($git == true ? GITURL : URI.parse($git))
else
vcs = VCS::SVN.new(SVNURL)
end
success = true success = true
revisions.collect {|rev| package(vcs, rev, destdir, tmp)}.flatten.each do |name| revisions.collect {|rev| package(vcs, rev, destdir, tmp)}.flatten.each do |name|