Fetch gem sources to be tested only

This commit is contained in:
Nobuyoshi Nakada 2024-11-01 00:32:11 +09:00
parent 0fda818bd7
commit cc893edaf2
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-10-31 17:33:36 +00:00
2 changed files with 7 additions and 1 deletions

View File

@ -1605,7 +1605,7 @@ install-for-test-bundled-gems: update-default-gemspecs
test-bundled-gems-fetch: yes-test-bundled-gems-fetch test-bundled-gems-fetch: yes-test-bundled-gems-fetch
yes-test-bundled-gems-fetch: yes-test-bundled-gems-fetch:
$(ACTIONS_GROUP) $(ACTIONS_GROUP)
$(Q) $(BASERUBY) -C $(srcdir)/gems ../tool/fetch-bundled_gems.rb src bundled_gems $(Q) $(BASERUBY) -C $(srcdir)/gems ../tool/fetch-bundled_gems.rb BUNDLED_GEMS="$(BUNDLED_GEMS)" src bundled_gems
$(ACTIONS_ENDGROUP) $(ACTIONS_ENDGROUP)
no-test-bundled-gems-fetch: no-test-bundled-gems-fetch:

View File

@ -5,6 +5,11 @@ BEGIN {
color = Colorize.new color = Colorize.new
if ARGV.first.start_with?("BUNDLED_GEMS=")
bundled_gems = ARGV.shift[13..-1].split(" ")
bundled_gems = nil if bundled_gems.empty?
end
dir = ARGV.shift dir = ARGV.shift
ARGF.eof? ARGF.eof?
FileUtils.mkdir_p(dir) FileUtils.mkdir_p(dir)
@ -15,6 +20,7 @@ n, v, u, r = $F
next unless n next unless n
next if n =~ /^#/ next if n =~ /^#/
next if bundled_gems&.all? {|pat| !File.fnmatch?(pat, n)}
if File.directory?(n) if File.directory?(n)
puts "updating #{color.notice(n)} ..." puts "updating #{color.notice(n)} ..."