diff --git a/.rubocop.yml b/.rubocop.yml index 43087d812..6e5ee4e18 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -66,6 +66,9 @@ Metrics/ParameterLists: Layout/LineContinuationLeadingSpace: Enabled: false +Lint/ConstantDefinitionInBlock: + Enabled: false + Lint/EmptyBlock: Enabled: false diff --git a/lib/const.rb b/lib/const.rb index 31100c5ed..c659b9fea 100644 --- a/lib/const.rb +++ b/lib/const.rb @@ -1,6 +1,6 @@ # lib/const.rb # Defines common constants used in different parts of crew -CREW_VERSION = '1.37.8' +CREW_VERSION = '1.37.9' # kernel architecture KERN_ARCH = `uname -m`.chomp @@ -113,9 +113,8 @@ CREW_LOCAL_REPO_ROOT = repo_root # The following is used in fixup.rb to determine if crew update needs to # be run again. Dir.chdir CREW_LIB_PATH do - @crew_const_git_commit = `git log -n1 --oneline #{CREW_LIB_PATH}lib/const.rb`.chomp.split.first + CREW_CONST_GIT_COMMIT = `git log -n1 --oneline #{CREW_LIB_PATH}lib/const.rb`.chomp.split.first end -CREW_CONST_GIT_COMMIT = @crew_const_git_commit CREW_LOCAL_REPO_BASE = CREW_LOCAL_REPO_ROOT.empty? ? '' : File.basename(CREW_LOCAL_REPO_ROOT) CREW_LOCAL_MANIFEST_PATH = if ENV['CREW_LOCAL_MANIFEST_PATH'].to_s.empty? diff --git a/lib/fixup.rb b/lib/fixup.rb index 6cb5d86fd..f58ceb097 100644 --- a/lib/fixup.rb +++ b/lib/fixup.rb @@ -5,7 +5,14 @@ FileUtils.rm_rf "#{HOME}/.cache/crewcache/manifest" # Fix missing $PATH not added in install.sh -if !system("grep -q '$PATH' #{CREW_PREFIX}/etc/env.d/path") || Gem::Version.new(CREW_VERSION.to_s) < Gem::Version.new('1.36.4') +@need_path = false +if !File.file?("#{CREW_PREFIX}/etc/env.d/path") + @need_path = true +elsif !system("grep -q '$PATH' #{CREW_PREFIX}/etc/env.d/path") || Gem::Version.new(CREW_VERSION.to_s) < Gem::Version.new('1.36.4') + @need_path = true +end +if @need_path + FileUtils.mkdir_p "#{CREW_PREFIX}/etc/env.d" File.write "#{CREW_PREFIX}/etc/env.d/path", <<~ENVD_PATH_EOF ## Inserted by Chromebrew version #{CREW_VERSION} PATH=#{CREW_PREFIX}/bin:#{CREW_PREFIX}/sbin:#{CREW_PREFIX}/share/musl/bin:$PATH diff --git a/packages/ruby_rubocop.rb b/packages/ruby_rubocop.rb index f39b97ca6..4d0da005c 100644 --- a/packages/ruby_rubocop.rb +++ b/packages/ruby_rubocop.rb @@ -6,10 +6,10 @@ require 'package' class Ruby_rubocop < Package description 'A Ruby static code analyzer and formatter' homepage 'https://rubocop.org' - version '1.56.4-ruby-3.2' + version '1.57.2-ruby-3.2' compatibility 'all' source_url 'https://github.com/chromebrew/chromebrew/raw/master/.rubocop.yml' - source_sha256 'ef0331bf6c4b032233f587b3fd74b688d9c1bd6cce32390dfca977bc92ef4968' + source_sha256 'b72214b7d7569ccdb34a43f7abbdf43cf4331f04838c79b82648d86606d96825' depends_on 'libyaml' depends_on 'ruby'