Allow wildcard (*) parameters in crew upstream (#11468)

This commit is contained in:
Ed Reel
2025-03-04 11:01:29 -06:00
committed by GitHub
parent 3162d66a36
commit c41e10cd7d
3 changed files with 10 additions and 5 deletions

View File

@@ -1817,10 +1817,13 @@ def upload_command(args)
end
def upstream_command(args)
puts "#{'Package'.ljust(35)}#{'Status'.ljust(20)}#{'Current'.ljust(20)}Upstream"
puts "#{'-------'.ljust(35)}#{'------'.ljust(20)}#{'-------'.ljust(20)}--------"
args['<name>'].each do |name|
name.gsub!('.rb', '')
search name
Dir.chdir CREW_PACKAGES_PATH do
system "../tools/version.rb #{name} #{@short_verbose}"
system "../tools/version.rb #{name} #{@short_verbose} -n"
end
end
end

View File

@@ -3,7 +3,7 @@
require 'etc'
OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
CREW_VERSION ||= '1.57.4' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
CREW_VERSION ||= '1.57.5' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
# Kernel architecture.
KERN_ARCH ||= Etc.uname[:machine]

View File

@@ -2,7 +2,7 @@
if ARGV.include?('-h') || ARGV.include?('--help')
abort <<~EOM
Usage: ./version.rb [<package>] [-h, --help, -v, --verbose]
Usage: ./version.rb [<package>] [-h, --help, -n, --no-header, -v, --verbose]
Example: ./version.rb abcde -v
The <package> can contain '*': ./version.rb xorg_*
If <package> is omitted, all packages will be checked.
@@ -104,8 +104,10 @@ else
end
if filelist.length.positive?
puts "#{'Package'.ljust(35)}#{'Status'.ljust(20)}#{'Current'.ljust(20)}Upstream"
puts "#{'-------'.ljust(35)}#{'------'.ljust(20)}#{'-------'.ljust(20)}--------"
unless ARGV.include?('-n') || ARGV.include?('--no-header')
puts "#{'Package'.ljust(35)}#{'Status'.ljust(20)}#{'Current'.ljust(20)}Upstream"
puts "#{'-------'.ljust(35)}#{'------'.ljust(20)}#{'-------'.ljust(20)}--------"
end
filelist.each do |filename|
pkg = Package.load_package(filename)
# Instead of typing out the name of every python package, we just use a regex here.