mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Convert workflows to use reviewdog, run rubocop on tree (#8939)
This commit is contained in:
committed by
GitHub
parent
3e2fa11072
commit
86a7814bda
4
.github/workflows/Markdown-lint.yml
vendored
4
.github/workflows/Markdown-lint.yml
vendored
@@ -7,6 +7,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Markdown-lint
|
||||
uses: bewuethr/mdl-action@v1
|
||||
uses: reviewdog/action-markdownlint@v0
|
||||
with:
|
||||
style-file: .mdl_style.rb
|
||||
markdownlint_flags: '-s .mdl_style.rb'
|
||||
|
||||
9
.github/workflows/Rubocop.yml
vendored
9
.github/workflows/Rubocop.yml
vendored
@@ -6,9 +6,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Rubocop
|
||||
uses: satmandu/Octocop@v0.0.3
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
reporter: github-pr-check
|
||||
rubocop_flags: "-l -c .rubocop.yml"
|
||||
ruby-version: '3.2'
|
||||
- name: Rubocop
|
||||
uses: reviewdog/action-rubocop@v2
|
||||
|
||||
4
.github/workflows/ShellCheck.yml
vendored
4
.github/workflows/ShellCheck.yml
vendored
@@ -7,6 +7,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: ShellCheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
uses: reviewdog/action-shellcheck@v1
|
||||
with:
|
||||
ignore_paths: ./tools/*
|
||||
exclude: './tools/*'
|
||||
|
||||
4
.github/workflows/YAMLlint.yml
vendored
4
.github/workflows/YAMLlint.yml
vendored
@@ -7,6 +7,4 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: YAMLLint
|
||||
uses: ibiqlik/action-yamllint@v3
|
||||
with:
|
||||
config_file: .yamllint.yml
|
||||
uses: reviewdog/action-yamllint@v1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
all
|
||||
rule 'MD003', :style => :atx
|
||||
rule 'MD029', :style => :ordered
|
||||
rule 'MD003', style: :atx
|
||||
rule 'MD029', style: :ordered
|
||||
|
||||
exclude_rule 'MD002' # We use HTML <h1> tag as the top level header
|
||||
exclude_rule 'MD013' # Ignore 80 character line length limit.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
AllCops:
|
||||
NewCops: enable
|
||||
TargetRubyVersion: 3.1
|
||||
TargetRubyVersion: 3.2
|
||||
Exclude:
|
||||
- 'lib/docopt.rb'
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
require 'package'
|
||||
|
||||
class Qmake < Package
|
||||
|
||||
def self.build
|
||||
system 'qmake'
|
||||
system 'make'
|
||||
|
||||
@@ -262,7 +262,7 @@ class Package
|
||||
unless cmd_args.grep(/-j[[:space:]]?[0-9]+/).any?
|
||||
if cmd_args.size == 1
|
||||
# involve a shell if the command is passed in one single string
|
||||
cmd_args = ['bash', '-c', cmd_args[0].sub(/^(make)\b/, "\\1 <<<CREW_NPROC>>>")]
|
||||
cmd_args = ['bash', '-c', cmd_args[0].sub(/^(make)\b/, '\\1 <<<CREW_NPROC>>>')]
|
||||
modded_make_cmd = true
|
||||
elsif cmd_args[0] == 'make'
|
||||
cmd_args.insert(1, '<<<CREW_NPROC>>>')
|
||||
@@ -280,7 +280,7 @@ class Package
|
||||
rescue RuntimeError => e
|
||||
if modded_make_cmd && make_threads != 1
|
||||
# retry with single thread if command is `make` and is modified by crew
|
||||
warn "Command \"#{cmd_args.map { |arg| arg.sub('<<<CREW_NPROC>>>', "-j#{make_threads}") } .join(' ')}\" failed, retrying with \"-j1\"...".yellow
|
||||
warn "Command \"#{cmd_args.map { |arg| arg.sub('<<<CREW_NPROC>>>', "-j#{make_threads}") }.join(' ')}\" failed, retrying with \"-j1\"...".yellow
|
||||
make_threads = 1
|
||||
retry
|
||||
else
|
||||
|
||||
@@ -9,18 +9,16 @@ class Alive < Autotools
|
||||
source_url 'https://ftpmirror.gnu.org/alive/alive-2.0.5.tar.lz'
|
||||
source_sha256 '94cf3dbffd9644405ed4944f94a7bb989674321607318c5a35d5fabc56a75089'
|
||||
|
||||
binary_url({
|
||||
})
|
||||
binary_sha256({
|
||||
})
|
||||
binary_url({})
|
||||
binary_sha256({})
|
||||
|
||||
depends_on 'guile' # R
|
||||
depends_on 'inetutils' # L
|
||||
|
||||
def self.preflight
|
||||
puts "You need to be in the VT-2 shell for the install of alive to work.".lightblue
|
||||
puts "Make sure you have used Ctrl-Alt-{F2/Right arrow/Refresh} to switch to VT-2.".lightblue
|
||||
puts 'You need to be in the VT-2 shell for the install of alive to work.'.lightblue
|
||||
puts 'Make sure you have used Ctrl-Alt-{F2/Right arrow/Refresh} to switch to VT-2.'.lightblue
|
||||
puts "Then login as 'chronos' and install alive with 'crew install alive'.".lightblue
|
||||
puts "You can then switch back to your regular Chromeos windows with Ctrl-Alt-{F1/Left arrow}.".lightblue
|
||||
puts 'You can then switch back to your regular Chromeos windows with Ctrl-Alt-{F1/Left arrow}.'.lightblue
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@ class Ruby_rubocop < Package
|
||||
version '1.57.2-ruby-3.2'
|
||||
compatibility 'all'
|
||||
source_url 'https://github.com/chromebrew/chromebrew/raw/master/.rubocop.yml'
|
||||
source_sha256 'bfbed91f5e939d498da3619f8df7e9854c15df8b8eb29ebc052809b14d64c851'
|
||||
source_sha256 '3942911bbee4c316617fa78825160726a398737db9a6085c743c9477acd55222'
|
||||
|
||||
depends_on 'libyaml'
|
||||
depends_on 'ruby'
|
||||
|
||||
@@ -6,12 +6,12 @@ $LOAD_PATH.unshift '../lib'
|
||||
require_relative '../lib/const'
|
||||
require_relative '../lib/package'
|
||||
|
||||
output = Array.new
|
||||
output = []
|
||||
|
||||
Dir.glob('../packages/*.rb').each do |filename|
|
||||
pkg = Package.load_package(filename)
|
||||
next if pkg.is_fake?
|
||||
output << {name: File.basename(filename, '.rb').gsub("_","-"), description: pkg.description, homepage: pkg.homepage, version: pkg.version, license: pkg.license, compatibility: pkg.compatibility}
|
||||
output << { name: File.basename(filename, '.rb').gsub('_', '-'), description: pkg.description, homepage: pkg.homepage, version: pkg.version, license: pkg.license, compatibility: pkg.compatibility }
|
||||
end
|
||||
|
||||
File.write('repology.json', JSON.generate(output))
|
||||
|
||||
Reference in New Issue
Block a user