mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Rework wildcard parameters in crew upstream (#11471)
Co-authored-by: Ed Reel <edreel@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2d0e4cc659
commit
fcce2116b0
11
bin/crew
11
bin/crew
@@ -1817,14 +1817,9 @@ 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} -n"
|
||||
end
|
||||
# Pass the whole argument input to tools/version.rb, stripping out any file extensions that occur as a result of using a wildcard argument in a directory where it matches files.
|
||||
Dir.chdir CREW_PACKAGES_PATH do
|
||||
system "../tools/version.rb #{args['<name>'].join(' ').gsub('.rb', '')} #{@short_verbose}"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
require 'etc'
|
||||
|
||||
OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
|
||||
CREW_VERSION ||= '1.57.5' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
CREW_VERSION ||= '1.57.6' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
|
||||
# Kernel architecture.
|
||||
KERN_ARCH ||= Etc.uname[:machine]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
if ARGV.include?('-h') || ARGV.include?('--help')
|
||||
abort <<~EOM
|
||||
Usage: ./version.rb [<package>] [-h, --help, -n, --no-header, -v, --verbose]
|
||||
Usage: ./version.rb [<package>] [-h, --help, -v, --verbose]
|
||||
Example: ./version.rb abcde -v
|
||||
The <package> can contain '*': ./version.rb xorg_*
|
||||
If <package> is omitted, all packages will be checked.
|
||||
@@ -104,10 +104,8 @@ else
|
||||
end
|
||||
|
||||
if filelist.length.positive?
|
||||
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
|
||||
puts "#{'Package'.ljust(35)}#{'Status'.ljust(20)}#{'Current'.ljust(20)}Upstream"
|
||||
puts "#{'-------'.ljust(35)}#{'------'.ljust(20)}#{'-------'.ljust(20)}--------"
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user