mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -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/package'
|
||||
require_relative '../lib/package_utils'
|
||||
require_relative '../lib/require_gem'
|
||||
|
||||
class Command
|
||||
def self.check(name, force)
|
||||
@@ -18,7 +19,14 @@ class Command
|
||||
# Use rubocop to sanitize package file, and let errors get flagged.
|
||||
if Kernel.system('rubocop --version', %i[out err] => File::NULL)
|
||||
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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user