Blob Blame History Raw
#!/usr/bin/python3
"""
Do Nothing

No-op stage. Prints a JSON dump of the options passed into this stage and
leaves the tree untouched. Useful for testing, debugging, and wasting time.
"""


import json
import sys

import osbuild.api


SCHEMA_2 = """
"options": {
  "additionalProperties": true
},
"inputs": {
  "additionalProperties": true
}
"""


def main(_tree, inputs, options):
    print("Not doing anything with these options:", json.dumps(options))

    for name, desc in inputs.items():
        print(f"Not doing anything with Input '{name}'", json.dumps(desc))


if __name__ == '__main__':
    args = osbuild.api.arguments()
    r = main(args["tree"], args.get("inputs", {}), args.get("options", {}))
    sys.exit(r)