mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-07 22:54:11 -05:00
AutoBuild: gem started at 2025-04-16-16UTC (#11724)
* Gem logic and version updates. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Use Time.new in progress_bar Signed-off-by: Satadru Pramanik <satadru@gmail.com> * WIP time issue Signed-off-by: Satadru Pramanik <satadru@gmail.com> * bump buildessential version Signed-off-by: Satadru Pramanik <satadru@gmail.com> * require time for progress_bar Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Try to fix time... Signed-off-by: Satadru Pramanik <satadru@gmail.com> * time debug Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Avoid conflict with progressbar gem. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Remove debug code Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Use CamelCase Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
456d16e80b
commit
1180b81ce4
@@ -2,6 +2,7 @@ require 'fileutils'
|
|||||||
require_relative '../lib/const'
|
require_relative '../lib/const'
|
||||||
require_relative '../lib/package'
|
require_relative '../lib/package'
|
||||||
require_relative '../lib/package_utils'
|
require_relative '../lib/package_utils'
|
||||||
|
require_relative '../lib/require_gem'
|
||||||
|
|
||||||
class Command
|
class Command
|
||||||
def self.check(name, force)
|
def self.check(name, force)
|
||||||
@@ -18,7 +19,14 @@ class Command
|
|||||||
# Use rubocop to sanitize package file, and let errors get flagged.
|
# Use rubocop to sanitize package file, and let errors get flagged.
|
||||||
if Kernel.system('rubocop --version', %i[out err] => File::NULL)
|
if Kernel.system('rubocop --version', %i[out err] => File::NULL)
|
||||||
puts "Using rubocop to sanitize #{local_package}".orange
|
puts "Using rubocop to sanitize #{local_package}".orange
|
||||||
system "rubocop -c #{File.join(CREW_LOCAL_REPO_ROOT, '.rubocop.yml')} -A #{local_package}", exception: true
|
# The .rubocop.yml file is found in the rubocop-chromebrew gem
|
||||||
|
require_gem('rubocop-chromebrew')
|
||||||
|
if File.file?(File.join(CREW_LOCAL_REPO_ROOT, '.rubocop.yml'))
|
||||||
|
system "rubocop -c #{File.join(CREW_LOCAL_REPO_ROOT, '.rubocop.yml')} -A #{local_package}", exception: true
|
||||||
|
else
|
||||||
|
puts 'The configuration file for rubocop in .rubocop.yml, from the rubocop-chromebrew gem, was not found.'.lightred
|
||||||
|
puts 'To install rubocop-chromebrew, run the following command: '.lightred + "crew #{PackageUtils.installed?('ruby_rubocop_chromebrew') ? 're' : ''}install ruby_rubocop_chromebrew".lightblue
|
||||||
|
end
|
||||||
else
|
else
|
||||||
puts "Rubocop is not installed, and thus will not be used to sanitize #{local_package}".lightred
|
puts "Rubocop is not installed, and thus will not be used to sanitize #{local_package}".lightred
|
||||||
puts 'To install Rubocop, run the following command: '.lightred + "crew #{PackageUtils.installed?('ruby_rubocop') ? 're' : ''}install ruby_rubocop".lightblue
|
puts 'To install Rubocop, run the following command: '.lightred + "crew #{PackageUtils.installed?('ruby_rubocop') ? 're' : ''}install ruby_rubocop".lightblue
|
||||||
|
|||||||
@@ -44,10 +44,17 @@ def set_vars(passed_name = nil, passed_version = nil)
|
|||||||
$gems ||= BasicCompactIndexClient.new.gems
|
$gems ||= BasicCompactIndexClient.new.gems
|
||||||
puts 'Done populating gem information.'.lightgreen
|
puts 'Done populating gem information.'.lightgreen
|
||||||
end
|
end
|
||||||
|
# Parse gem information from compact index, the format for which is
|
||||||
|
# here: https://guides.rubygems.org/rubygems-org-compact-index-api/
|
||||||
|
# Figure out gem name, noting that there may be dashes and underscores
|
||||||
|
# in the name.
|
||||||
gem_test = $gems.grep(/#{"^#{passed_name.gsub(/^ruby_/, '')}\\s.*$"}/).last.blank? ? $gems.grep(/#{"^\(#{passed_name.gsub(/^ruby_/, '').gsub('_', ')*.(')}\\s\).*$"}/).last : $gems.grep(/#{"^#{passed_name.gsub(/^ruby_/, '')}\\s.*$"}/).last
|
gem_test = $gems.grep(/#{"^#{passed_name.gsub(/^ruby_/, '')}\\s.*$"}/).last.blank? ? $gems.grep(/#{"^\(#{passed_name.gsub(/^ruby_/, '').gsub('_', ')*.(')}\\s\).*$"}/).last : $gems.grep(/#{"^#{passed_name.gsub(/^ruby_/, '')}\\s.*$"}/).last
|
||||||
abort "Cannot find #{passed_name} gem to install.".lightred if gem_test.blank?
|
abort "Cannot find #{passed_name} gem to install.".lightred if gem_test.blank?
|
||||||
gem_test_name = gem_test.split.first
|
gem_test_name = gem_test.split.first
|
||||||
gem_test_versions = gem_test.split[1].split(',')
|
gem_test_versions = gem_test.split[1].split(',')
|
||||||
|
# Remove minus prefixed versions, as those have been yanked as per
|
||||||
|
# https://guides.rubygems.org/rubygems-org-compact-index-api/
|
||||||
|
gem_test_versions.delete_if { |i| i.start_with?('-') }
|
||||||
# Any version with a letter is considered a prerelease as per
|
# Any version with a letter is considered a prerelease as per
|
||||||
# https://github.com/rubygems/rubygems/blob/b5798efd348935634d4e0e2b846d4f455582db48/lib/rubygems/version.rb#L305
|
# https://github.com/rubygems/rubygems/blob/b5798efd348935634d4e0e2b846d4f455582db48/lib/rubygems/version.rb#L305
|
||||||
gem_test_versions.delete_if { |i| i.match?(/[a-zA-Z]/) }
|
gem_test_versions.delete_if { |i| i.match?(/[a-zA-Z]/) }
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
require 'etc'
|
require 'etc'
|
||||||
|
|
||||||
OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
|
OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
|
||||||
CREW_VERSION ||= '1.58.1' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
CREW_VERSION ||= '1.58.2' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||||
|
|
||||||
# Kernel architecture.
|
# Kernel architecture.
|
||||||
KERN_ARCH ||= Etc.uname[:machine]
|
KERN_ARCH ||= Etc.uname[:machine]
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ def http_downloader(uri, filename = File.basename(url), verbose: false)
|
|||||||
downloaded_size = 0.0
|
downloaded_size = 0.0
|
||||||
|
|
||||||
# initialize progress bar
|
# initialize progress bar
|
||||||
progress_bar = ProgressBar.new(file_size)
|
progress_bar = ChromebrewProgressBar.new(file_size)
|
||||||
|
|
||||||
if verbose
|
if verbose
|
||||||
warn <<~EOT
|
warn <<~EOT
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ require 'io/console'
|
|||||||
require_relative 'color'
|
require_relative 'color'
|
||||||
require_relative 'misc_functions'
|
require_relative 'misc_functions'
|
||||||
|
|
||||||
class ProgressBar
|
class ChromebrewProgressBar
|
||||||
class InvalidSizeError < StandardError; end
|
class InvalidSizeError < StandardError; end
|
||||||
|
|
||||||
attr_accessor :progress_bar_showing
|
attr_accessor :progress_bar_showing
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require 'package'
|
|||||||
class Buildessential < Package
|
class Buildessential < Package
|
||||||
description 'A collection of tools essential to compile and build software.'
|
description 'A collection of tools essential to compile and build software.'
|
||||||
homepage 'SKIP'
|
homepage 'SKIP'
|
||||||
version '1.41'
|
version '1.42'
|
||||||
license 'GPL-3+'
|
license 'GPL-3+'
|
||||||
compatibility 'all'
|
compatibility 'all'
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ class Buildessential < Package
|
|||||||
depends_on 'ruby_pry_byebug'
|
depends_on 'ruby_pry_byebug'
|
||||||
# Add rubocop for linting packages. (This also installs the
|
# Add rubocop for linting packages. (This also installs the
|
||||||
# rubocop config file.)
|
# rubocop config file.)
|
||||||
# depends_on 'ruby_rubocop'
|
depends_on 'ruby_rubocop'
|
||||||
|
|
||||||
# Code quality
|
# Code quality
|
||||||
depends_on 'py3_pre_commit'
|
depends_on 'py3_pre_commit'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
|||||||
class Ruby_bundler < RUBY
|
class Ruby_bundler < RUBY
|
||||||
description "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably."
|
description "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably."
|
||||||
homepage 'https://bundler.io'
|
homepage 'https://bundler.io'
|
||||||
version "2.6.7-#{CREW_RUBY_VER}"
|
version "2.6.8-#{CREW_RUBY_VER}"
|
||||||
license 'MIT'
|
license 'MIT'
|
||||||
compatibility 'all'
|
compatibility 'all'
|
||||||
source_url 'SKIP'
|
source_url 'SKIP'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
|||||||
class Ruby_csv < RUBY
|
class Ruby_csv < RUBY
|
||||||
description 'The csv library provides a complete interface to csv files and data.'
|
description 'The csv library provides a complete interface to csv files and data.'
|
||||||
homepage 'https://github.com/ruby/csv'
|
homepage 'https://github.com/ruby/csv'
|
||||||
version "3.3.3-#{CREW_RUBY_VER}"
|
version "3.3.4-#{CREW_RUBY_VER}"
|
||||||
license 'BSD-2-Clause'
|
license 'BSD-2-Clause'
|
||||||
compatibility 'all'
|
compatibility 'all'
|
||||||
source_url 'SKIP'
|
source_url 'SKIP'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
|||||||
class Ruby_parallel < RUBY
|
class Ruby_parallel < RUBY
|
||||||
description 'Run any code in parallel Processes(> use all CPUs), Threads(> speedup blocking operations), or Ractors(> use all CPUs).'
|
description 'Run any code in parallel Processes(> use all CPUs), Threads(> speedup blocking operations), or Ractors(> use all CPUs).'
|
||||||
homepage 'https://github.com/grosser/parallel'
|
homepage 'https://github.com/grosser/parallel'
|
||||||
version "1.26.3-#{CREW_RUBY_VER}"
|
version "1.27.0-#{CREW_RUBY_VER}"
|
||||||
license 'MIT'
|
license 'MIT'
|
||||||
compatibility 'all'
|
compatibility 'all'
|
||||||
source_url 'SKIP'
|
source_url 'SKIP'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
|||||||
class Ruby_pry_byebug < RUBY
|
class Ruby_pry_byebug < RUBY
|
||||||
description 'Adds step-by-step debugging and stack navigation capabilities to pry using byebug.'
|
description 'Adds step-by-step debugging and stack navigation capabilities to pry using byebug.'
|
||||||
homepage 'https://github.com/deivid-rodriguez/pry-byebug'
|
homepage 'https://github.com/deivid-rodriguez/pry-byebug'
|
||||||
version "3.10.1-#{CREW_RUBY_VER}"
|
version "3.11.0-#{CREW_RUBY_VER}"
|
||||||
license 'MIT'
|
license 'MIT'
|
||||||
compatibility 'all'
|
compatibility 'all'
|
||||||
source_url 'SKIP'
|
source_url 'SKIP'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
|||||||
class Ruby_reline < RUBY
|
class Ruby_reline < RUBY
|
||||||
description 'Alternative GNU Readline or Editline implementation by pure Ruby.'
|
description 'Alternative GNU Readline or Editline implementation by pure Ruby.'
|
||||||
homepage 'https://github.com/ruby/reline'
|
homepage 'https://github.com/ruby/reline'
|
||||||
version "0.6.0-#{CREW_RUBY_VER}"
|
version "0.6.1-#{CREW_RUBY_VER}"
|
||||||
license 'Ruby'
|
license 'Ruby'
|
||||||
compatibility 'all'
|
compatibility 'all'
|
||||||
source_url 'SKIP'
|
source_url 'SKIP'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
|||||||
class Ruby_rubocop_chromebrew < RUBY
|
class Ruby_rubocop_chromebrew < RUBY
|
||||||
description 'A RuboCop extension to enforce Chromebrew-specific practices.'
|
description 'A RuboCop extension to enforce Chromebrew-specific practices.'
|
||||||
homepage 'https://github.com/chromebrew/rubocop-chromebrew'
|
homepage 'https://github.com/chromebrew/rubocop-chromebrew'
|
||||||
version "0.0.3-#{CREW_RUBY_VER}"
|
version "0.0.4-#{CREW_RUBY_VER}"
|
||||||
license 'GPL-3.0-or-later'
|
license 'GPL-3.0-or-later'
|
||||||
compatibility 'all'
|
compatibility 'all'
|
||||||
source_url 'SKIP'
|
source_url 'SKIP'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require 'buildsystems/ruby'
|
|||||||
class Ruby_rubygems_update < RUBY
|
class Ruby_rubygems_update < RUBY
|
||||||
description 'RubyGems is a package management framework for Ruby.'
|
description 'RubyGems is a package management framework for Ruby.'
|
||||||
homepage 'https://github.com/rubygems/rubygems'
|
homepage 'https://github.com/rubygems/rubygems'
|
||||||
version "3.6.3-#{CREW_RUBY_VER}"
|
version "3.6.8-#{CREW_RUBY_VER}"
|
||||||
license 'MIT'
|
license 'MIT'
|
||||||
compatibility 'all'
|
compatibility 'all'
|
||||||
source_url 'SKIP'
|
source_url 'SKIP'
|
||||||
|
|||||||
Reference in New Issue
Block a user