Skip to content

Commit 982a02e

Browse files
committed
update overlay with new command
1 parent 7380729 commit 982a02e

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

ci.jsonnet

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{
2-
overlay: "afc708191d99695291bc143cc41864e4da7c8fd0",
3-
}
1+
{ overlay: "a66dd3b7df9fa12c99f6b162cd8cc3bf37d7e3a1" }

mx.graalpython/mx_graalpython.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,24 @@ def update_import(name, rev="origin/master", callback=None):
735735

736736

737737
def update_import_cmd(args):
738-
"""Update our mx imports"""
738+
"""Update our mx or overlay imports"""
739+
if any("overlay" in arg for arg in args):
740+
mx.log("Updating overlays")
741+
dirs = os.listdir(os.path.join(SUITE.dir, ".."))
742+
for d in dirs:
743+
if d.startswith("graalpython"):
744+
d = os.path.join(SUITE.dir, "..", d)
745+
jsonnetfile = os.path.join(d, "ci.jsonnet")
746+
if not os.path.exists(jsonnetfile):
747+
continue
748+
overlaydir = os.path.join(d, "..", "ci-overlays")
749+
if not os.path.exists(overlaydir):
750+
mx.abort("Overlays must be next to repo")
751+
vc = mx.VC.get_vc(overlaydir)
752+
tip = str(vc.tip(overlaydir)).strip()
753+
with open(jsonnetfile, "w") as f:
754+
f.write('{ overlay: "%s" }\n' % tip)
755+
return
739756
if not args:
740757
args = ["truffle"]
741758
if "sulong" in args:

0 commit comments

Comments
 (0)