summaryrefslogtreecommitdiff
path: root/tool/make-snapshot
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-13 15:47:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-13 15:47:33 +0000
commitbebbbc393a78e3d5220f196dd76d4b3583f74f0d (patch)
tree644d39504254e6d269edd6d5f518a429e8678d5e /tool/make-snapshot
parent26db9bb27cec89d9b9bb52ada711bdadbaa83256 (diff)
make-snapshot: -package option
* tool/make-snapshot (package): add -package option to select packages to be made. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/make-snapshot')
-rwxr-xr-xtool/make-snapshot10
1 files changed, 9 insertions, 1 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 262cdc8..99f80de 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -21,6 +21,7 @@ options:
-archname=NAME make the basename of snapshots NAME
-keep_temp keep temporary working directory
-patch_file=PATCH apply PATCH file after export
+ -packages=PKG[,...] make PKG packages (#{PACKAGES.keys.join(", ")})
version:
trunk, stable, branches/*, tags/*, X.Y.Z, X.Y.Z-pL
each versions may be followed by optional @revision.
@@ -67,6 +68,12 @@ class Dir
end unless respond_to?(:mktmpdir)
end
+$packages &&= $packages.split(/[, ]+/).tap {|pkg|
+ pkg -= PACKAGES.keys
+ pkg.empty? or abort "#{File.basename $0}: unknown packages - #{pkg.join(", ")}"
+}
+$packages ||= PACKAGES.keys
+
$patch_file &&= File.expand_path($patch_file)
path = ENV["PATH"].split(File::PATH_SEPARATOR)
%w[YACC BASERUBY RUBY MV MINIRUBY].each do |var|
@@ -279,7 +286,8 @@ def package(rev, destdir)
end
tarball = nil
- return PACKAGES.collect do |mesg, (ext, *cmd)|
+ return $packages.collect do |mesg|
+ (ext, *cmd) = PACKAGES[mesg]
File.directory?(destdir) or FileUtils.mkpath(destdir)
file = File.join(destdir, "#{$archname||v}#{ext}")
case ext