Files
vpn-dns-gateway/demo/ci/verify-snapshot.py
vsun1 c4ca770ee4
vpn-dns-gateway/pipeline/head This commit looks good
vpn-dns-gateway/pipeline/pr-main This commit looks good
Support issue-linked demo source changes
2026-11-27 20:42:33 -05:00

19 lines
681 B
Python

"""Verify the frozen import or a precisely recorded, issue-linked downstream tree."""
import argparse
import json
from pathlib import Path
import sys
sys.dont_write_bytecode = True
from source_provenance import verify_source
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--require-tracked', action='store_true',
help='Also verify source blobs and provenance records against the Git index.')
args = parser.parse_args()
try:
print(json.dumps(verify_source(Path(__file__).resolve().parents[1], args.require_tracked), indent=2))
except (ValueError, OSError) as error:
parser.exit(1, f'Source verification failed: {error}\n')