aboutsummaryrefslogtreecommitdiff
path: root/kci_build
diff options
context:
space:
mode:
Diffstat (limited to 'kci_build')
-rwxr-xr-xkci_build19
1 files changed, 17 insertions, 2 deletions
diff --git a/kci_build b/kci_build
index a4d1254..a4763bd 100755
--- a/kci_build
+++ b/kci_build
@@ -132,6 +132,11 @@ class Args(object):
'help': "Path the output directory",
}
+ json_path = {
+ 'name': '--json-path',
+ 'help': "Path to the JSON file",
+ }
+
# -----------------------------------------------------------------------------
# Commands
@@ -397,10 +402,20 @@ class cmd_push_kernel(Command):
class cmd_publish_kernel(Command):
help = "Publish the kernel meta-data"
- args = [Args.kdir, Args.api, Args.token]
+ args = [Args.kdir]
+ opt_args = [Args.api, Args.token, Args.json_path]
def __call__(self, configs, args):
- return kernelci.build.publish_kernel(args.kdir, args.api, args.token)
+ if not ((args.api and args.token) or args.json_path):
+ print("""\
+Invalid arguments, please provide at least one of these sets of options:
+ --token, --api to publish to the backend server
+ --json-path to save the data in a local JSON file\
+""")
+ return False
+ return kernelci.build.publish_kernel(
+ args.kdir, api=args.api, token=args.token,
+ json_path=args.json_path)
# -----------------------------------------------------------------------------
# Main