diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index fd9713e6d919c0..fc52b2119a6733 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -47,7 +47,7 @@ jobs: sudo pip3 install -U setuptools wheel pip pip3 install -r scripts/requirements-base.txt pip3 install -r scripts/requirements-doc.txt - pip3 install west==0.10.1 + pip3 install west==0.11.0 - name: west setup run: | diff --git a/doc/guides/west/built-in.rst b/doc/guides/west/built-in.rst index 04ef48ac5d0b1a..c84dc986716c85 100644 --- a/doc/guides/west/built-in.rst +++ b/doc/guides/west/built-in.rst @@ -197,9 +197,15 @@ if you just want to disable a single group, e.g. ``--group-filter=-bar``. If a project in the manifest has a ``submodules`` key, the submodules are updated as follows, depending on the value of the ``submodules`` key. -If the project has ``submodules: true``, west runs one of the following in -the project repository, depending on whether you run ``west update`` -with the ``--rebase`` option or without it: +If the project has ``submodules: true``, west first synchronizes the project's +submodules with: + +.. code-block:: + + git submodule sync --recursive + +West then runs one of the following in the project repository, depending on +whether you run ``west update`` with the ``--rebase`` option or without it: .. code-block:: @@ -210,9 +216,14 @@ with the ``--rebase`` option or without it: git submodule update --init --rebase --recursive Otherwise, the project has ``submodules: ``. In this -case, west runs one of the following in the project repository for each -submodule path in the list, depending on whether you run ``west update`` -with the ``--rebase`` option or without it: +case, west synchronizes the project's submodules with: + +.. code-block:: + + git submodule sync --recursive -- + +Then it updates each submodule in the list as follows, depending on whether you +run ``west update`` with the ``--rebase`` option or without it: .. code-block:: @@ -222,6 +233,9 @@ with the ``--rebase`` option or without it: # with --rebase, e.g. "west update --rebase": git submodule update --init --rebase --recursive +The ``git submodule sync`` commands are skipped if the +``update.sync-submodules`` :ref:`west-config` option is false. + .. _west-built-in-misc: Other project commands diff --git a/doc/guides/west/config.rst b/doc/guides/west/config.rst index d1e2f660be13eb..93951ad5ad25d1 100644 --- a/doc/guides/west/config.rst +++ b/doc/guides/west/config.rst @@ -156,6 +156,18 @@ commands are documented in the pages for those commands. from project remotes when those projects' revisions in the manifest file are SHAs or tags which are already available locally. The ``"always"`` behavior is to unconditionally fetch from the remote. + * - ``update.name-cache`` + - String. If non-empty, ``west update`` will use its value as the + ``--name-cache`` option's value if not given on the command line. + * - ``update.narrow`` + - Boolean. If ``true``, ``west update`` behaves as if ``--narrow`` was + given on the command line. The default is ``false``. + * - ``update.path-cache`` + - String. If non-empty, ``west update`` will use its value as the + ``--path-cache`` option's value if not given on the command line. + * - ``update.sync-submodules`` + - Boolean. If ``true`` (the default), :ref:`west-update` will synchronize + Git submodules before updating them. * - ``zephyr.base`` - String, default value to set for the :envvar:`ZEPHYR_BASE` environment variable while the west command is running. By default, this is set to diff --git a/doc/guides/west/index.rst b/doc/guides/west/index.rst index 85f1c05b1032ea..daab87797f9f3a 100644 --- a/doc/guides/west/index.rst +++ b/doc/guides/west/index.rst @@ -26,7 +26,7 @@ You can run ``west --help`` (or ``west -h`` for short) to get top-level help for available west commands, and ``west -h`` for detailed help on each command. -The following pages document west's ``v0.9.x`` releases, and provide additional +The following pages document west's ``v0.11.x`` releases, and provide additional context about the tool. .. toctree:: diff --git a/doc/guides/west/release-notes.rst b/doc/guides/west/release-notes.rst index 65ae43d2e8ee2f..8c033d9273a650 100644 --- a/doc/guides/west/release-notes.rst +++ b/doc/guides/west/release-notes.rst @@ -1,6 +1,31 @@ West Release Notes ################## +v0.11.0 +******* + +New features: + +- ``west update`` now supports ``--narrow``, ``--name-cache``, and + ``--path-cache`` options. These can be influenced by the ``update.narrow``, + ``update.name-cache``, and ``update.path-cache`` :ref:`west-config` options. + These can be used to optimize the speed of the update. +- ``west update`` now supports a ``--fetch-opt`` option that will be passed to + the ``git fetch`` command used to fetch remote revisions when updating each + project. + +Bug fixes: + +- ``west update`` now synchronizes Git submodules in projects by default. This + avoids issues if the URL changes in the manifest file from when the submodule + was first initialized. This behavior can be disabled by setting the + ``update.sync-submodules`` configuration option to ``false``. + +Other changes: + +- the :ref:`west-apis-manifest` module has fixed docstrings for the Project + class + v0.10.1 ******* diff --git a/doc/guides/west/west-apis.rst b/doc/guides/west/west-apis.rst index 43b3bc295b8643..0ce468c8095e2b 100644 --- a/doc/guides/west/west-apis.rst +++ b/doc/guides/west/west-apis.rst @@ -89,6 +89,12 @@ WestCommand True if reading the manifest property will succeed instead of erroring out. + .. py:attribute:: git_version_info + + A tuple of Git version information. + + .. versionadded:: 0.11.0 + Constructor: .. automethod:: __init__ @@ -109,6 +115,14 @@ WestCommand .. automethod:: add_parser + .. automethod:: check_call + + .. versionchanged:: 0.11.0 + + .. automethod:: check_output + + .. versionchanged:: 0.11.0 + All subclasses must provide the following abstract methods, which are used to implement the above: