Commit a2d3117a authored by Jonatan Hatakeyama Zeidler's avatar Jonatan Hatakeyama Zeidler
Browse files

Make --debug the debug build, while debug_clickable becomes --verbose

parent 101bbf48
......@@ -83,9 +83,9 @@ class Clickable(object):
help='Use the specified arch when building (ignores the setting in clickable.json)'
)
parser.add_argument(
'--debug',
'--verbose',
action='store_true',
help='Runs clickable in debug mode',
help='Allows to debug clickable by enabling verbose output',
default=False,
)
parser.add_argument(
......@@ -121,6 +121,12 @@ class Clickable(object):
parser.add_argument(
'--debug-build',
action='store_true',
help='Perform a debug build (deprecated, use --debug instead)',
default=False,
)
parser.add_argument(
'--debug',
action='store_true',
help='Perform a debug build',
default=False,
)
......@@ -207,7 +213,7 @@ def main():
try:
clickable.run(args.commands, args)
except Exception:
if args.debug:
if args.verbose:
raise
else:
print_error(str(sys.exc_info()[1]))
......
......@@ -31,7 +31,8 @@ class DesktopCommand(Command):
def run(self, path_arg=None):
self.prepare_run(self.config)
docker_config = self.setup_docker(self.config)
self.run_docker_command(docker_config, verbose_mode=self.config.debug)
self.run_docker_command(docker_config,
verbose_mode=self.config.verbose)
def prepare_run(self, config):
self.run_clean_and_build_commands(config)
......
......@@ -104,7 +104,7 @@ class Config(object):
use_nvidia = False
apikey = None
custom_docker_image = True
debug = False
verbose = False
debug_build = False
debug_gdb = False
debug_gdb_port = None
......@@ -190,7 +190,7 @@ class Config(object):
self.build_arch = 'amd64'
# only turn on nvidia mode in desktop mode
if NvidiaDriversInstalled().is_met():
if self.debug:
if self.verbose:
print_info('Turning on nvidia mode.')
self.use_nvidia = True
......@@ -329,11 +329,15 @@ class Config(object):
if args.apikey:
self.apikey = args.apikey
if args.verbose:
self.verbose = True
if args.debug:
self.debug = True
self.debug_build = True
if args.debug_build:
self.debug_build = True
print_warning('"--debug-build" is deprecated, use "--debug" instead!')
if args.gdb:
self.debug_build = True
......
......@@ -51,4 +51,4 @@ A project that uses go version 1.6.
rust
----
A project that uses rust. Debug builds can be enabled by specifying ``--debug-build``.
A project that uses rust. Debug builds can be enabled by specifying ``--debug``.
......@@ -24,7 +24,7 @@ Placeholders & Environment Variables
The following placeholders can be used in the clickable.json.
They are also provided as environment variables during build.
When passing ``--debug-build`` to Clickable, ``DEBUG_BUILD=1`` is set
When passing ``--debug`` to Clickable, ``DEBUG_BUILD=1`` is set
as an environment variable additionally.
======================= ======
......@@ -278,7 +278,7 @@ Defaults to ``~/.clickable/cargo``.
build_args
----------
Optional, arguments to pass to qmake or cmake. When using ``--debug-build``,
Optional, arguments to pass to qmake or cmake. When using ``--debug``,
``CONFIG+=debug`` is additionally appended for qmake and
``-DCMAKE_BUILD_TYPE=Debug`` for cmake and cordova builds. Ex: ``CONFIG+=ubuntu``
......
......@@ -22,7 +22,7 @@ Compile and run the app on the desktop.
Note: ArchLinux user might need to run ``xhost +local:clickable`` before using
desktop mode.
Run ``clickable desktop --debug`` to show the executed docker command.
Run ``clickable desktop --verbose`` to show the executed docker command.
Run ``clickable desktop --dark-mode`` to set the dark mode preference.
......@@ -52,7 +52,7 @@ On Ubuntu, install these requirements using ``apt install nvidia-modprobe nvidia
On Ubuntu, install these requirements using ``apt install nvidia-container-toolkit``.
Run clickable with the ``--debug`` flag to see the executed command for your system.
Run clickable with the ``--verbose`` flag to see the executed command for your system.
``clickable create``
......
......@@ -98,7 +98,7 @@ Overrides the clickable.json's :ref:`dirty <clickable-json-dirty>`.
``CLICKABLE_DEBUG_BUILD``
-------------------------
Same as ``--debug-build``
Same as ``--debug``
``CLICKABLE_TEST``
------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment