2
0
Fork 0
mirror of https://github.com/elementor/hello-theme.git synced 2026-03-03 12:56:14 +08:00
hello-theme/.github/scripts/validate-changelog.sh
2025-12-01 14:59:55 +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