1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2021-10-20 21:41:45 +02:00
parent 5322745b29
commit 207a5a5bc1
2 changed files with 13 additions and 3 deletions

View file

@ -57,6 +57,10 @@ class RubyImplementation
File.basename(git_url, ".git")
end
def repo_path
"#{__dir__}/#{repo_name}"
end
def repo_org
File.basename(File.dirname(git_url))
end
@ -152,6 +156,11 @@ def rebase_commits(impl)
raise "#{days_since_last_merge.floor} days since last merge, probably wrong commit"
end
puts "Checking if the last merge is consistent with upstream files"
rubyspec_commit = `git log -n 1 --format='%s' #{last_merge}`.chomp.split('@', 2)[-1]
sh "git", "checkout", last_merge
sh "git", "diff", "--exit-code", rubyspec_commit, "--", ":!.github"
puts "Rebasing..."
sh "git", "branch", "-D", rebased if branch?(rebased)
sh "git", "checkout", "-b", rebased, impl.name

View file

@ -15,9 +15,10 @@ NUMBER = /^\d+\)$/
ERROR_OR_FAILED = / (ERROR|FAILED)$/
SPEC_FILE = /^(\/.+_spec\.rb)\:\d+/
output.slice_before(NUMBER).select { |number, error_line, *rest|
number =~ NUMBER and error_line =~ ERROR_OR_FAILED
}.each { |number, error_line, *rest|
output.slice_before(NUMBER).select { |number, *rest|
number =~ NUMBER and rest.any? { |line| line =~ ERROR_OR_FAILED }
}.each { |number, *rest|
error_line = rest.find { |line| line =~ ERROR_OR_FAILED }
description = error_line.match(ERROR_OR_FAILED).pre_match
spec_file = rest.find { |line| line =~ SPEC_FILE }