docs(run.sh): update script documentation and help output
All checks were successful
Auto Changelog & Release / release (push) Successful in 7s

- Improve script documentation for clarity and consistency
- Extend help output to include detailed descriptions of options
This commit is contained in:
2025-07-02 13:56:09 +02:00
parent b1644de411
commit fd29805fa1

22
run.sh
View File

@@ -1,12 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# run.sh – local wrapper for the “deb-changelog-action” # run.sh – local wrapper for the “deb-changelog-action”
# #
# This script # Behaviour:
# 1. clones https://git.0xmax42.io/actions/deb-changelog-action at the # • Clones https://git.0xmax42.io/actions/deb-changelog-action at the requested version into a temporary directory.
# requested version into a temporary directory, # • Installs git-cliff via the action’s helper script.
# 2. installs git-cliff using the action’s helper script, and # • Generates a Debian-style changelog **in the current working directory** via the action’s generator script.
# 3. generates a Debian-style changelog **in the current working directory**
# via the action’s generator script.
# #
# Usage: # Usage:
# ./run.sh --version v0 \ # ./run.sh --version v0 \
@@ -17,6 +15,16 @@
# [--output_file debian/changelog] \ # [--output_file debian/changelog] \
# [--cliff_config path/to/cliff.toml] # [--cliff_config path/to/cliff.toml]
# #
# Options:
# --version <ver> Action version to clone (required)
# --tag <tag> Git tag used as starting point (required)
# --package_name <name> Debian package name (required)
# --author_name <name> Changelog author name (required)
# --author_email <mail> Changelog author e-mail (required)
# --output_file <file> Changelog path (default: debian/changelog)
# --cliff_config <file> git-cliff config file (default: configs/cliff.debian.toml)
# -h, --help Show this help message
#
# Notes: # Notes:
# • Paths given for --output_file are interpreted relative to the directory # • Paths given for --output_file are interpreted relative to the directory
# where you run this script. # where you run this script.
@@ -38,7 +46,7 @@ OUTPUT_FILE="debian/changelog"
CLIFF_CONFIG="" CLIFF_CONFIG=""
# ─────────────────────────────────────────────── # ───────────────────────────────────────────────
show_help() { sed -n '2,25p' "$0"; } show_help() { sed -n '2,34p' "$0"; }
# 1 ─ Parse CLI options ───────────────────────── # 1 ─ Parse CLI options ─────────────────────────
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do