diff --git a/.appveyor.yml b/.appveyor.yml index c9014e3a..d107286b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -17,7 +17,7 @@ build_script: - yarn buildforelectron - "%PYTHON%\\python.exe -m pip install -r scripts\\requirements.txt" - "%PYTHON%\\python.exe scripts\\build.py download" - - "%PYTHON%\\python.exe scripts\\build.py build -b dist" + - "%PYTHON%\\python.exe scripts\\build.py build_exe -b dist -s" - "%PYTHON%\\python.exe scripts\\build.py validate -b dist" - yarn electron-builder --win --x64 diff --git a/.circleci/config.yml b/.circleci/config.yml index f1f36fc1..096b2a65 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,7 +37,7 @@ jobs: brew install python3 pip3 install -r scripts/requirements.txt python3 scripts/build.py download - python3 scripts/build.py build -b dist + python3 scripts/build.py build_exe -b dist -s python3 scripts/build.py validate -b dist - run: diff --git a/.travis.yml b/.travis.yml index 42ad82af..3fef6ee6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,10 +56,6 @@ after_script: - | pip3 install -r scripts/requirements.txt python3 scripts/build.py download - python3 scripts/build.py build -b dist - # build command from cx_freeze does something in background and we need to assure - # that step completed - - | - source env/bin/activate + python3 scripts/build.py build_exe -b dist -s python3 scripts/build.py validate -b dist - yarn electron-builder --linux --x64 diff --git a/scripts/build.py b/scripts/build.py index 8e2f0a0d..2aeb1a9b 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -228,24 +228,24 @@ def validate_command(arguments): if __name__ == '__main__': parser = argparse.ArgumentParser( - description='Building gns3server for distribution') + description='Building gns3server for distribution') + subparsers = parser.add_subparsers( - dest='command', - help="Command which needs to be executed") + dest='command', help='Command which needs to be executed') - download_parser = subparsers.add_parser( - 'download', help="Downloads source code of gns3server") + parser_download = subparsers.add_parser( + 'download', help='Downloads source code of gns3server') - build_parser = subparsers.add_parser( - 'build', help="Build gns3server") - build_parser.add_argument('-b', default=None, help="Output directory") + parser_build = subparsers.add_parser('build_exe', help='Build gns3server') + parser_build.add_argument('-b', help='Output directory') + parser_build.add_argument('-s', action='store_true', help='Silient building') - validate_parser = subparsers.add_parser( - 'validate', help="Validate build") - validate_parser.add_argument('-b', default=None, help="Output directory") + parser_validate = subparsers.add_parser('validate', help='Validate build') + parser_validate.add_argument('-b', help='Output directory') args = parser.parse_args() - if args.command == 'build': + + if args.command == 'build_exe': prepare() build_command(args) elif args.command == 'download':