From e3e5b89a707cc921a62091a146f295c2db652e21 Mon Sep 17 00:00:00 2001 From: memsharded Date: Tue, 29 Oct 2024 00:31:43 +0100 Subject: [PATCH 1/2] conan new default name/version args --- reference/commands/new.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/reference/commands/new.rst b/reference/commands/new.rst index aa8367e172f3..d7c103e35f14 100644 --- a/reference/commands/new.rst +++ b/reference/commands/new.rst @@ -100,6 +100,9 @@ The available templates are: Its variables are: ``name``, ``version`` +All default ``name`` and ``version`` variables are defaulted to ``mypkg`` and ``0.1`` respectively if not provided by the user. + + .. warning:: The output of the predefined built-in templates is **not stable**. It might @@ -123,6 +126,13 @@ Generates a basic *conanfile.py* that does not implement any custom functionalit Generates a *conanfile.py* for ``mygame`` that depends on the packages ``math/1.0`` and ``ai/1.3`` +.. code-block:: text + + $ conan new cmake_lib + +Creates a basic CMake library with default package ``name = "mypkg"`` and default package version ``version = "0.1"`` + + .. code-block:: text $ conan new cmake_exe -d name=game -d version=1.0 -d requires=math/3.14 -d requires=ai/1.0 From 261c117e1a1b6aef752d6320fa074a20e3be35a4 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 29 Oct 2024 10:22:43 +0100 Subject: [PATCH 2/2] Update reference/commands/new.rst Co-authored-by: Carlos Zoido --- reference/commands/new.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/commands/new.rst b/reference/commands/new.rst index d7c103e35f14..94df3936b161 100644 --- a/reference/commands/new.rst +++ b/reference/commands/new.rst @@ -100,7 +100,7 @@ The available templates are: Its variables are: ``name``, ``version`` -All default ``name`` and ``version`` variables are defaulted to ``mypkg`` and ``0.1`` respectively if not provided by the user. +By default, all ``name`` and ``version`` variables are set to ``mypkg`` and ``0.1``, respectively, if not provided by the user. .. warning::