From 19d7f0733e77a57a5bf5743917c7d6f9abc10b50 Mon Sep 17 00:00:00 2001 From: Catalin Ionut Fratila Date: Fri, 10 Feb 2017 14:26:53 +0100 Subject: [PATCH] create-dist: Adding argument to supress api docs generation. --- script/create-dist.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/script/create-dist.py b/script/create-dist.py index 4aa67eacd676..f9d590259c1e 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import argparse import glob import os import re @@ -86,7 +87,9 @@ def main(): copy_chrome_binary('mksnapshot') copy_license() - if PLATFORM != 'win32': + args = parse_args() + + if PLATFORM != 'win32' and not args.no_api_docs: create_api_json_schema() if PLATFORM == 'linux': @@ -241,5 +244,13 @@ def create_symbols_zip(): make_zip(os.path.join(DIST_DIR, pdb_name), pdbs + licenses, []) +def parse_args(): + parser = argparse.ArgumentParser(description='Create Electron Distribution') + parser.add_argument('--no_api_docs', + action='store_true', + help='Skip generating the Electron API Documentation!') + return parser.parse_args() + + if __name__ == '__main__': sys.exit(main())