mirror of
https://github.com/openwrt/openwrt.git
synced 2026-06-17 12:40:16 +04:00
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 <mail@aparcar.org>
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from os import getenv, environ
|
from os import getenv, environ
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from subprocess import run, PIPE
|
from subprocess import run, PIPE, DEVNULL
|
||||||
from sys import argv
|
from sys import argv
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
@@ -92,6 +92,15 @@ if output:
|
|||||||
"vermagic": linux_vermagic,
|
"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":
|
for artifact in "imagebuilder", "sdk", "toolchain":
|
||||||
filename = add_artifact(artifact)
|
filename = add_artifact(artifact)
|
||||||
add_artifact("llvm-bpf", prefix="")
|
add_artifact("llvm-bpf", prefix="")
|
||||||
|
|||||||
Reference in New Issue
Block a user