From 2c3f9b036668af6152770b9249b17e9f677e4816 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 15 Sep 2023 10:02:23 +0200 Subject: [PATCH 1/3] add docs --- reference/commands/profile.rst | 42 ++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/reference/commands/profile.rst b/reference/commands/profile.rst index e42cb93debc2..d0c3e8dcf1c4 100644 --- a/reference/commands/profile.rst +++ b/reference/commands/profile.rst @@ -138,54 +138,56 @@ conan profile show .. code-block:: text $ conan profile show -h - usage: conan profile show [-h] [-v [V]] [-o OPTIONS_HOST] - [-o:b OPTIONS_BUILD] [-o:h OPTIONS_HOST] - [-pr PROFILE_HOST] [-pr:b PROFILE_BUILD] - [-pr:h PROFILE_HOST] [-s SETTINGS_HOST] - [-s:b SETTINGS_BUILD] [-s:h SETTINGS_HOST] - [-c CONF_HOST] [-c:b CONF_BUILD] [-c:h CONF_HOST] + usage: conan profile show [-h] [-f FORMAT] [-v [V]] [-o OPTIONS_HOST] + [-o:b OPTIONS_BUILD] [-o:h OPTIONS_HOST] + [-pr PROFILE_HOST] [-pr:b PROFILE_BUILD] + [-pr:h PROFILE_HOST] [-s SETTINGS_HOST] + [-s:b SETTINGS_BUILD] [-s:h SETTINGS_HOST] + [-c CONF_HOST] [-c:b CONF_BUILD] [-c:h CONF_HOST] Show aggregated profiles from the passed arguments. optional arguments: - -h, --help show this help message and exit - -v [V] Level of detail of the output. Valid options from less + -h, --help show this help message and exit + -f FORMAT, --format FORMAT + Select the output format: json + -v [V] Level of detail of the output. Valid options from less verbose to more verbose: -vquiet, -verror, -vwarning, -vnotice, -vstatus, -v or -vverbose, -vv or -vdebug, -vvv or -vtrace - -o OPTIONS_HOST, --options OPTIONS_HOST + -o OPTIONS_HOST, --options OPTIONS_HOST Define options values (host machine), e.g.: -o Pkg:with_qt=true - -o:b OPTIONS_BUILD, --options:build OPTIONS_BUILD + -o:b OPTIONS_BUILD, --options:build OPTIONS_BUILD Define options values (build machine), e.g.: -o:b Pkg:with_qt=true - -o:h OPTIONS_HOST, --options:host OPTIONS_HOST + -o:h OPTIONS_HOST, --options:host OPTIONS_HOST Define options values (host machine), e.g.: -o:h Pkg:with_qt=true - -pr PROFILE_HOST, --profile PROFILE_HOST + -pr PROFILE_HOST, --profile PROFILE_HOST Apply the specified profile to the host machine - -pr:b PROFILE_BUILD, --profile:build PROFILE_BUILD + -pr:b PROFILE_BUILD, --profile:build PROFILE_BUILD Apply the specified profile to the build machine - -pr:h PROFILE_HOST, --profile:host PROFILE_HOST + -pr:h PROFILE_HOST, --profile:host PROFILE_HOST Apply the specified profile to the host machine - -s SETTINGS_HOST, --settings SETTINGS_HOST + -s SETTINGS_HOST, --settings SETTINGS_HOST Settings to build the package, overwriting the defaults (host machine). e.g.: -s compiler=gcc - -s:b SETTINGS_BUILD, --settings:build SETTINGS_BUILD + -s:b SETTINGS_BUILD, --settings:build SETTINGS_BUILD Settings to build the package, overwriting the defaults (build machine). e.g.: -s:b compiler=gcc - -s:h SETTINGS_HOST, --settings:host SETTINGS_HOST + -s:h SETTINGS_HOST, --settings:host SETTINGS_HOST Settings to build the package, overwriting the defaults (host machine). e.g.: -s:h compiler=gcc - -c CONF_HOST, --conf CONF_HOST + -c CONF_HOST, --conf CONF_HOST Configuration to build the package, overwriting the defaults (host machine). e.g.: -c tools.cmake.cmaketoolchain:generator=Xcode - -c:b CONF_BUILD, --conf:build CONF_BUILD + -c:b CONF_BUILD, --conf:build CONF_BUILD Configuration to build the package, overwriting the defaults (build machine). e.g.: -c:b tools.cmake.cmaketoolchain:generator=Xcode - -c:h CONF_HOST, --conf:host CONF_HOST + -c:h CONF_HOST, --conf:host CONF_HOST Configuration to build the package, overwriting the defaults (host machine). e.g.: -c:h tools.cmake.cmaketoolchain:generator=Xcode From 28fb30c80e31d445403b051938aaa12d40ca25b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Fri, 15 Sep 2023 12:14:36 +0200 Subject: [PATCH 2/3] Add json exmaple --- reference/commands/profile.rst | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/reference/commands/profile.rst b/reference/commands/profile.rst index d0c3e8dcf1c4..7521d57176e0 100644 --- a/reference/commands/profile.rst +++ b/reference/commands/profile.rst @@ -245,6 +245,48 @@ Check the evaluated profile: [conf] ... + +The command can also output a json witht the results: + +.. code-block:: text + + $ conan profile show --format=json + + { + "host": { + "settings": { + "arch": "armv8", + "build_type": "Release", + "compiler": "apple-clang", + "compiler.cppstd": "gnu17", + "compiler.libcxx": "libc++", + "compiler.version": "15", + "os": "Macos" + }, + "package_settings": {}, + "options": {}, + "tool_requires": {}, + "conf": {}, + "build_env": "" + }, + "build": { + "settings": { + "arch": "armv8", + "build_type": "Release", + "compiler": "apple-clang", + "compiler.cppstd": "gnu17", + "compiler.libcxx": "libc++", + "compiler.version": "15", + "os": "Macos" + }, + "package_settings": {}, + "options": {}, + "tool_requires": {}, + "conf": {}, + "build_env": "" + } + } + .. seealso:: - Read more about :ref:`profiles` From 3a36071d732b1a38a870a9724367c10aa0a1c9e8 Mon Sep 17 00:00:00 2001 From: Carlos Zoido Date: Fri, 15 Sep 2023 12:18:22 +0200 Subject: [PATCH 3/3] Update reference/commands/profile.rst --- reference/commands/profile.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/commands/profile.rst b/reference/commands/profile.rst index 7521d57176e0..32460d62a0cc 100644 --- a/reference/commands/profile.rst +++ b/reference/commands/profile.rst @@ -246,7 +246,7 @@ Check the evaluated profile: ... -The command can also output a json witht the results: +The command can also output a json with the results: .. code-block:: text