Skip to content

Commit fe95ff5

Browse files
committed
[GR-15940] Find the latest merge commit of the graal repo to find the corresponding import in downstream.
PullRequest: truffleruby/860
2 parents e5a2cc7 + f69cb0a commit fe95ff5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ci.jsonnet

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,14 @@ local part_definitions = {
158158
local url = ["mx", "urlrewrite", "https://github.com/graalvm/graal-enterprise.git"],
159159
repo = "../graal-enterprise",
160160
suite_file = "graal-enterprise/mx.graal-enterprise/suite.py",
161-
find_commit_importing_truffle = ["git", "-C", repo, "log", "--reverse", "--pretty=%H", "-m", "-S"] + jt(["truffle_version"]) + ["--grep=PullRequest:", suite_file, "|", "head", "-1"];
161+
# Find the latest merge commit of a pull request in the graal repo, equal or older than our graal import.
162+
merge_commit_in_graal = ["git", "-C", "../graal", "log", "--pretty=%H", "--grep=PullRequest:", "--merges", "-n1"] + jt(["truffle_version"]),
163+
# Find the commit importing that version of graal in graal-enterprise by looking at the suite file.
164+
# The suite file is automatically updated on every graal PR merged.
165+
graal_enterprise_commit = ["git", "-C", repo, "log", "--pretty=%H", "--grep=PullRequest:", "--reverse", "-m", "-S", merge_commit_in_graal, suite_file, "|", "head", "-1"];
162166
[
163167
["git", "clone", url, repo],
164-
["git", "-C", repo, "checkout", find_commit_importing_truffle],
168+
["git", "-C", repo, "checkout", graal_enterprise_commit],
165169
],
166170

167171
setup+: self.clone + jt(["build", "--dy", "/graal-enterprise"]),

0 commit comments

Comments
 (0)