aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-10 03:50:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-10 03:50:47 +0000
commite67591be57fe151eb7e56d0befe6a003a455c5a2 (patch)
tree9b8e8ec7cb369006d1acbedaefdd53ccb7b4ee39 /tool
parent2174cfead1284eed8a59c69a557c2704752060b5 (diff)
downloadruby-e67591be57fe151eb7e56d0befe6a003a455c5a2.tar.gz
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
Diffstat (limited to 'tool')
-rwxr-xr-xtool/make-snapshot14
1 files changed, 13 insertions, 1 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 1e35d37d2f..91c44bdf88 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -50,6 +50,7 @@ end
ENV["LC_ALL"] = ENV["LANG"] = "C"
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.]+)"/
ENV["VPATH"] ||= "include/ruby"
@@ -413,7 +414,18 @@ ensure
FileUtils.rm_rf(v) if v and !$exported and !$keep_temp
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
revisions.collect {|rev| package(vcs, rev, destdir, tmp)}.flatten.each do |name|