fix: ensure correct sourcing of utility files in scripts
All checks were successful
Auto Changelog & Release / release (push) Successful in 7s

- Updated `scripts/generate-changelog.sh` and `scripts/install-git-cliff.sh` to use `SCRIPT_DIR` for sourcing utility files.
- Ensured paths are resolved relative to the script location, independent of the working directory.
- Improved script reliability and portability.
This commit is contained in:
2025-07-02 13:05:19 +02:00
parent 6a5a127e44
commit 3aee9078e1
2 changed files with 6 additions and 4 deletions

View File

@@ -18,8 +18,9 @@
# • Generates the changelog; removes a leading empty line.
set -euo pipefail
source "$(dirname "$0")/../lib/utils.sh"
source "$(dirname "$0")/../lib/logging.sh"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/utils.sh"
source "$SCRIPT_DIR/../lib/logging.sh"
# ───────────────────────────────────────────────
CONFIG_FILE=""

View File

@@ -14,8 +14,9 @@
# • If a specific version was requested, the installed version is compared; identical → exit, different → upgrade.
set -euo pipefail
source "$(dirname "$0")/../lib/utils.sh"
source "$(dirname "$0")/../lib/logging.sh"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/utils.sh"
source "$SCRIPT_DIR/../lib/logging.sh"
REPO="orhun/git-cliff"