Commit d7ff0e4b authored by Benjamin Cabé's avatar Benjamin Cabé Committed by Daniel DeGrasse
Browse files

doc: develop: gsg: have west init use pinned Zephyr version for releases



When building the docs for a release, the section of the getting started
that lets the user `west init` their workspace now has them check out
the version matchin the release.

Fixes zephyrproject-rtos/zephyr#92163

Signed-off-by: default avatarBenjamin Cabé <benjamin@zephyrproject.org>
parent 792e3c2f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -143,6 +143,9 @@ SDK_URL_BASE="https://github.com/zephyrproject-rtos/sdk-ng/releases/download"
rst_epilog = f"""
.. include:: /substitutions.txt

.. |zephyr-version| replace:: ``{version}``
.. |zephyr-version-ltrim| unicode:: {version}
   :ltrim:
.. |sdk-version-literal| replace:: ``{sdk_version}``
.. |sdk-version-trim| unicode:: {sdk_version}
   :trim:
+18 −4
Original line number Diff line number Diff line
@@ -252,12 +252,26 @@ chosen. You'll also install Zephyr's additional Python dependencies in a

      #. Get the Zephyr source code:

         .. only:: not release

            .. code-block:: bash

               west init ~/zephyrproject
               cd ~/zephyrproject
               west update

         .. only:: release

            .. We need to use a parsed-literal here because substitutions do not work in code
               blocks. This means users can't copy-paste these lines as easily as other blocks but
               should be good enough still :)

            .. parsed-literal::

               west init ~/zephyrproject --mr v |zephyr-version-ltrim|
               cd ~/zephyrproject
               west update

      #. Export a :ref:`Zephyr CMake package <cmake_pkg>`. This allows CMake to
         automatically load boilerplate code required for building Zephyr
         applications.