mirror of
https://git.yoctoproject.org/meta-zephyr
synced 2026-09-13 21:49:30 +02:00
Replace basic sys.argv argument parsing with argparse module to provide:
- Change the Zephyr version argument from a positional argument to an
explicit -v/--version option, making the intent clearer at the command
line.
- Proper -h/--help option with usage information.
- Better error messages for invalid version format.
- Usage examples in help text.
- Improved user experience.
- Update README.md with usage.
The script now displays helpful information when called with --help:
$ generate-version.py --help
usage: generate-version.py [-h] -v VERSION
Generate Zephyr kernel source include file for a specific version
options:
-h, --help show this help message and exit
-v VERSION, --version VERSION
Zephyr version in the form x.y.z (e.g., 3.7.0, 4.3.0)
Example:
generate-version.py -v 3.7.0
generate-version.py --version 4.3.0
AI-Generated: GitHub Copilot (Claude Sonnet 4.6)
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>