mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
26db9bb27c
commit
bebbbc393a
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue