diff options
Diffstat (limited to 'mdbp/streamapi.py')
-rw-r--r-- | mdbp/streamapi.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mdbp/streamapi.py b/mdbp/streamapi.py index 8f67366..f36208a 100644 --- a/mdbp/streamapi.py +++ b/mdbp/streamapi.py @@ -12,6 +12,7 @@ Differences to the regular backend API: """ import argparse +import fnmatch import json import pathlib import subprocess @@ -67,7 +68,9 @@ def main() -> None: sys.exit(code) with tarfile.open(fileobj=sys.stdout.buffer, mode="w|") as outtar: for elem in outdir.iterdir(): - tar_add(outtar, elem) + if any(fnmatch.fnmatchcase(elem.name, pattern) + for pattern in build["output"].get("artifacts", ["*"])): + tar_add(outtar, elem) if __name__ == "__main__": main() |