mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-16 01:06:09 +00:00
Do not use globs when building docs
If we use an explicit file lists then the docs are regenerated when the source files change.
This commit is contained in:
parent
8f904cac17
commit
da6928fe76
@ -8,7 +8,6 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
import glob
|
|
||||||
import os
|
import os
|
||||||
from typing import Dict, List, Any
|
from typing import Dict, List, Any
|
||||||
|
|
||||||
@ -21,16 +20,14 @@ if __name__ == "__main__":
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"filename_dst", action="store", type=str, help="markdown destination"
|
"filename_dst", action="store", type=str, help="markdown destination"
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument("json_attrs", nargs="+", help="JSON attributes")
|
||||||
"attr_dir", action="store", type=str, help="directory for attributes"
|
|
||||||
)
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
with open(args.filename_src, "rb") as f:
|
with open(args.filename_src, "rb") as f:
|
||||||
template = f.read()
|
template = f.read()
|
||||||
|
|
||||||
txt: List[str] = []
|
txt: List[str] = []
|
||||||
for fn in sorted(glob.glob(os.path.join(args.attr_dir, "*.json"))):
|
for fn in sorted(args.json_attrs):
|
||||||
try:
|
try:
|
||||||
with open(fn, "rb") as f:
|
with open(fn, "rb") as f:
|
||||||
item = json.loads(f.read())
|
item = json.loads(f.read())
|
||||||
|
38
docs/hsi-tests.d/meson.build
Normal file
38
docs/hsi-tests.d/meson.build
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
hsi_test_jsons = files([
|
||||||
|
'org.fwupd.hsi.Amd.PlatformRollbackProtection.json',
|
||||||
|
'org.fwupd.hsi.Amd.SpiReplayProtection.json',
|
||||||
|
'org.fwupd.hsi.Amd.SpiWriteProtection.json',
|
||||||
|
'org.fwupd.hsi.EncryptedRam.json',
|
||||||
|
'org.fwupd.hsi.IntelBootguard.Acm.json',
|
||||||
|
'org.fwupd.hsi.IntelBootguard.Enabled.json',
|
||||||
|
'org.fwupd.hsi.IntelBootguard.Otp.json',
|
||||||
|
'org.fwupd.hsi.IntelBootguard.Policy.json',
|
||||||
|
'org.fwupd.hsi.IntelBootguard.Verified.json',
|
||||||
|
'org.fwupd.hsi.IntelCet.Active.json',
|
||||||
|
'org.fwupd.hsi.IntelCet.Enabled.json',
|
||||||
|
'org.fwupd.hsi.IntelSmap.json',
|
||||||
|
'org.fwupd.hsi.Iommu.json',
|
||||||
|
'org.fwupd.hsi.Kernel.Lockdown.json',
|
||||||
|
'org.fwupd.hsi.Kernel.Tainted.json',
|
||||||
|
'org.fwupd.hsi.Mei.BootGuardPlatformKey.json',
|
||||||
|
'org.fwupd.hsi.Mei.ManufacturingMode.json',
|
||||||
|
'org.fwupd.hsi.Mei.OverrideStrap.json',
|
||||||
|
'org.fwupd.hsi.Mei.Version.json',
|
||||||
|
'org.fwupd.hsi.PlatformDebugEnabled.json',
|
||||||
|
'org.fwupd.hsi.PlatformDebugLocked.json',
|
||||||
|
'org.fwupd.hsi.PlatformFused.json',
|
||||||
|
'org.fwupd.hsi.PrebootDma.json',
|
||||||
|
'org.fwupd.hsi.Spi.Bioswe.json',
|
||||||
|
'org.fwupd.hsi.Spi.Ble.json',
|
||||||
|
'org.fwupd.hsi.Spi.Descriptor.json',
|
||||||
|
'org.fwupd.hsi.Spi.SmmBwp.json',
|
||||||
|
'org.fwupd.hsi.SupportedCpu.json',
|
||||||
|
'org.fwupd.hsi.SuspendToIdle.json',
|
||||||
|
'org.fwupd.hsi.SuspendToRam.json',
|
||||||
|
'org.fwupd.hsi.Tpm.EmptyPcr.json',
|
||||||
|
'org.fwupd.hsi.Tpm.ReconstructionPcr0.json',
|
||||||
|
'org.fwupd.hsi.Tpm.Version20.json',
|
||||||
|
'org.fwupd.hsi.Uefi.Pk.json',
|
||||||
|
'org.fwupd.hsi.Uefi.SecureBoot.json',
|
||||||
|
])
|
||||||
|
|
@ -43,15 +43,15 @@ if gidocgen_dep.found() and docs_python_deps.allowed() and gidocgen_app.found()
|
|||||||
install_dir: join_paths(datadir, 'doc'),
|
install_dir: join_paths(datadir, 'doc'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
subdir('hsi-tests.d')
|
||||||
hsi_md = custom_target('generate-hsi-spec',
|
hsi_md = custom_target('generate-hsi-spec',
|
||||||
input : 'hsi.md.in',
|
input: hsi_test_jsons,
|
||||||
output : 'hsi.md',
|
output : 'hsi.md',
|
||||||
command : [
|
command : [
|
||||||
python3,
|
python3,
|
||||||
join_paths(meson.current_source_dir(), 'generate-hsi-spec.py'),
|
files(['generate-hsi-spec.py', 'hsi.md.in']),
|
||||||
'@INPUT@',
|
|
||||||
'@OUTPUT@',
|
'@OUTPUT@',
|
||||||
join_paths(meson.current_source_dir(), 'hsi-tests.d'),
|
'@INPUT@',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user