2 Commits

Author SHA1 Message Date
Peter Hoyes
0a05d27d14 zephyr-core/scripts: Resolve Zephyr tag using git ls-remote
To simplify the logic to resolve Git tags to SHAs, and so that it works
with non-Github repositories, use git ls-remote instead of the Github
API.

Make the resolve_revision function available as a Jinja filter and move
the version resolution to the template.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2023-04-20 15:02:55 +08:00
Peter Hoyes
f12da18fe0 zephyr-core/scripts: Introduce script to generate new versions
Add a Python script which can be used to automatically generate
configuration for new Zephyr versions. This script:
 * Takes the Zephyr version as a single argument
 * Uses the Github API to find the version tag's SHA1
 * Uses West as a library to parse the version's manifest file
 * Uses a Jinja template to generate a .inc file for the version
 * Outputs the .inc file directly into the zephyr-kernel directory

The generated .inc file includes:
 * SRCREVs for all modules
 * Separate SRC_URI_x variables for each module, to make it easier to
   swap out a specific URL for a fork or mirror
 * A version-specific SRC_URI, containing only the modules defined in
   the release
 * A list of the ZEPHYR_MODULES

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Tested-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2022-09-21 11:51:20 +08:00