From a36edd2b32deff9f2c63dc2fe27b9a329105bdbf Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Mon, 20 Apr 2026 19:46:13 +0800 Subject: [PATCH] scripts: add git_commit to profiles.json Right now we only have the special getver.sh output (i.e. r32802-f505120278) instead of the actual, full git hash. Offer the full hash for downstream tooling, specifically the KernelCI. Signed-off-by: Paul Spooren --- scripts/json_overview_image_info.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index 0449bb56d7..08838729da 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -2,7 +2,7 @@ from os import getenv, environ from pathlib import Path -from subprocess import run, PIPE +from subprocess import run, PIPE, DEVNULL from sys import argv import json import re @@ -92,6 +92,15 @@ if output: "vermagic": linux_vermagic, } + git_commit = run( + ["git", "rev-parse", "HEAD"], + stdout=PIPE, + stderr=DEVNULL, + universal_newlines=True, + ) + if git_commit.returncode == 0: + output["git_commit"] = git_commit.stdout.strip() + for artifact in "imagebuilder", "sdk", "toolchain": filename = add_artifact(artifact) add_artifact("llvm-bpf", prefix="")