diff --git a/.appveyor.yml b/.appveyor.yml index c9014e3a..a0be4ceb 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/exe.gns3server -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..5e1b90db 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/exe.gns3server -s python3 scripts/build.py validate -b dist - run: diff --git a/.travis.yml b/.travis.yml index d4201e61..7276a7e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,9 +54,8 @@ after_script: - yarn buildforelectron - python3 -m venv env - | - source env/bin/activate pip3 install -r scripts/requirements.txt python3 scripts/build.py download - python3 scripts/build.py build -b dist -# python3 scripts/build.py validate -b dist + python3 scripts/build.py build_exe -b dist/exe.gns3server -s + python3 scripts/build.py validate -b dist - yarn electron-builder --linux --x64 diff --git a/scripts/build.py b/scripts/build.py index 2c665bad..f502a6f7 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -229,24 +229,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':