mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01: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 json
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@ -14,14 +15,16 @@ def main():
|
||||
parser.add_argument("builddir", type=Path)
|
||||
args = parser.parse_args()
|
||||
|
||||
logfile = args.builddir / "meson-logs" / "meson-log.txt"
|
||||
with logfile.open(encoding="utf-8") as f:
|
||||
if "Failed to guess install tag" in f.read():
|
||||
print(
|
||||
f"Some files are missing install_tag, see {logfile} for details." # no-qa
|
||||
)
|
||||
return 1
|
||||
return 0
|
||||
success = True
|
||||
path = args.builddir / "meson-info" / "intro-install_plan.json"
|
||||
with path.open(encoding="utf-8") as f:
|
||||
install_plan = json.load(f)
|
||||
for target in install_plan.values():
|
||||
for info in target.values():
|
||||
if not info["tag"]:
|
||||
print('Missing install_tag for', info["destination"])
|
||||
success = False
|
||||
return 0 if success else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user