1
0
Fork 0
mirror of https://github.com/elementor/hello-theme.git synced 2026-07-27 14:01:37 +08:00
hello-theme/.github/scripts/validate-changelog.sh
2025-12-01 13:40:53 +02:00

19 lines
372 B
Bash
Executable file

#!/bin/bash
set -eo pipefail
if [[ -z "$VERSION" ]]; then
echo "Set the VERSION env var"
exit 1
fi
if [[ ! -f "readme.txt" ]]; then
echo "readme.txt file does not exist"
exit 1
fi
if ! grep -q "= ${VERSION} -" readme.txt; then
echo "readme.txt file does not contain changelog entry for version: ${VERSION}"
echo "Expected format: = ${VERSION} - DATE"
exit 1
fi