mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-03 17:35:44 +02:00
ci: Fix check for missing install tag
Better check the installation plan json file instead of parsing logs.
This commit is contained in:
parent
b8a0ffa1b9
commit
9ba01dc7fc
@ -6,6 +6,7 @@ missing installation tag.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
@ -14,14 +15,16 @@ def main():
|
|||||||
parser.add_argument("builddir", type=Path)
|
parser.add_argument("builddir", type=Path)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
logfile = args.builddir / "meson-logs" / "meson-log.txt"
|
success = True
|
||||||
with logfile.open(encoding="utf-8") as f:
|
path = args.builddir / "meson-info" / "intro-install_plan.json"
|
||||||
if "Failed to guess install tag" in f.read():
|
with path.open(encoding="utf-8") as f:
|
||||||
print(
|
install_plan = json.load(f)
|
||||||
f"Some files are missing install_tag, see {logfile} for details." # no-qa
|
for target in install_plan.values():
|
||||||
)
|
for info in target.values():
|
||||||
return 1
|
if not info["tag"]:
|
||||||
return 0
|
print('Missing install_tag for', info["destination"])
|
||||||
|
success = False
|
||||||
|
return 0 if success else 1
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user