mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/mspec@4120a62
This commit is contained in:
parent
201d501640
commit
31636bbddc
1 changed files with 18 additions and 9 deletions
|
@ -157,12 +157,16 @@ def rebase_commits(impl)
|
|||
end
|
||||
end
|
||||
|
||||
def new_commits?(impl)
|
||||
Dir.chdir(SOURCE_REPO) do
|
||||
diff = `git diff master #{impl.rebased_branch}`
|
||||
!diff.empty?
|
||||
end
|
||||
end
|
||||
|
||||
def test_new_specs
|
||||
require "yaml"
|
||||
Dir.chdir(SOURCE_REPO) do
|
||||
diff = `git diff master`
|
||||
abort "#{BRIGHT_YELLOW}No new commits, aborting#{RESET}" if diff.empty?
|
||||
|
||||
workflow = YAML.load_file(".github/workflows/ci.yml")
|
||||
job_name = MSPEC ? "test" : "specs"
|
||||
versions = workflow.dig("jobs", job_name, "strategy", "matrix", "ruby")
|
||||
|
@ -195,8 +199,8 @@ end
|
|||
def fast_forward_master(impl)
|
||||
Dir.chdir(SOURCE_REPO) do
|
||||
sh "git", "checkout", "master"
|
||||
sh "git", "merge", "--ff-only", "#{impl.name}-rebased"
|
||||
sh "git", "branch", "--delete", "#{impl.name}-rebased"
|
||||
sh "git", "merge", "--ff-only", impl.rebased_branch
|
||||
sh "git", "branch", "--delete", impl.rebased_branch
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -215,10 +219,15 @@ def main(impls)
|
|||
update_repo(impl)
|
||||
filter_commits(impl)
|
||||
rebase_commits(impl)
|
||||
if new_commits?(impl)
|
||||
test_new_specs
|
||||
verify_commits(impl)
|
||||
fast_forward_master(impl)
|
||||
check_ci
|
||||
else
|
||||
STDERR.puts "#{BRIGHT_YELLOW}No new commits#{RESET}"
|
||||
fast_forward_master(impl)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue