Browse Source

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: Benjamin Cabé <benjamin@zephyrproject.org>
pull/92793/head
Benjamin Cabé 6 days ago committed by Daniel DeGrasse
parent
commit
d7ff0e4ba4
  1. 3
      doc/conf.py
  2. 14
      doc/develop/getting_started/index.rst

3
doc/conf.py

@ -143,6 +143,9 @@ SDK_URL_BASE="https://github.com/zephyrproject-rtos/sdk-ng/releases/download" @@ -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:

14
doc/develop/getting_started/index.rst

@ -252,12 +252,26 @@ chosen. You'll also install Zephyr's additional Python dependencies in a @@ -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.

Loading…
Cancel
Save