ihm_client/scripts/checks/version_alignment.sh
Your Name 6e38410369
Some checks failed
CI/CD Pipeline / security (push) Has been skipped
CI/CD Pipeline / integration-test (push) Has been skipped
CI/CD Pipeline / test (push) Failing after 18s
chore(template-sync): aligner avec 4NK_template (.cursor/.gitea/.gitea_template/scripts/ignores)
2025-08-27 11:37:40 +02:00

21 lines
580 B
Bash

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd)"
cd "$ROOT_DIR"
version_file="VERSION"
[[ -f TEMPLATE_VERSION ]] && version_file="TEMPLATE_VERSION"
[[ -f "$version_file" ]] || { echo "Version file missing ($version_file)"; exit 1; }
v=$(tr -d '\r' < "$version_file" | head -n1)
[[ -n "$v" ]] || { echo "Empty version"; exit 1; }
echo "Version file: $version_file=$v"
if ! grep -Eq "^## \\[$(echo "$v" | sed 's/^v//')\\]" CHANGELOG.md; then
echo "CHANGELOG entry for $v not found"; exit 1;
fi
echo "Version alignment OK"