Skip to content

Commit

Permalink
Add notes about --update (conan-io#3587)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrilRBS authored Feb 15, 2024
1 parent 50285c3 commit 86b49fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions reference/commands/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,13 @@ Read more about lockfiles in :ref:`tutorial_consuming_packages_versioning_lockfi
.. seealso::

- Read the tutorial about the :ref:`local package development flow <local_package_development_flow>`.


Update
------

The ``conan install`` command has a ``--update`` argument that will force the re-evaluation of the selected items of the dependency graph,
allowing for the update of the dependencies to the latest version if using version ranges, or to the latest revision of the same version,
when those versions are not locked in the given lockfile. Passing ``--update`` will check every package in the dependency graph,
but it is also possible to pass a package name to the ``--update`` argument (it can be added to the command more than once with different names),
to only update those packages, which avoids the re-evaluation of the whole graph.
3 changes: 3 additions & 0 deletions tutorial/versioning/version_ranges.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ This holds as long as the newer version lies within the defined range, if we cre
Requirements
pkg/1.2
When using version ranges, versions in the cache are preferred over remote ones, so if you have a local
``pkg/1.2`` package, it will be used instead of the remote one, even if the remote one is newer.
To ensure you use the latest available one, you can use the ``--update`` argument in the ``install``/``create`` command.

Version ranges can be defined in several places:

Expand Down

0 comments on commit 86b49fd

Please sign in to comment.