[scripts/release] add more checks before committing release

- check if CHANGELOG was updated
- sync with origin/master
This commit is contained in:
Mike Fährmann
2026-01-17 20:40:48 +01:00
parent 038efda445
commit 235fb25f6b
2 changed files with 19 additions and 5 deletions

View File

@@ -6,5 +6,5 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
__version__ = "1.31.3"
__version__ = "1.31.4-dev"
__variant__ = None

View File

@@ -150,15 +150,29 @@ changelog() {
> "${CHANGELOG}"
}
supportedsites() {
prepare() {
cd "${ROOTDIR}"
echo Checking if "${SUPPORTEDSITES}" is up to date
echo Checking if "${SUPPORTEDSITES}" is up to date
./scripts/supportedsites.py
if ! git diff --quiet "${SUPPORTEDSITES}"; then
if ! git diff --quiet -- "${SUPPORTEDSITES}"; then
echo "updated ${SUPPORTEDSITES} contains changes"
exit 4
fi
echo Checking changed files
DIFF="$(git diff --name-only)"
if [[ "$DIFF" != "${CHANGELOG}" ]]; then
if [[ "$DIFF" != *"${CHANGELOG}"* ]]; then
echo "Missing ${NEWVERSION} '${CHANGELOG}' entries"
else
printf "Uncommited changes to files other than '${CHANGELOG}':\n%s\n" "$DIFF"
fi
exit 4
fi
echo Syncing local branch with origin/master
git pull --autostash
}
upload-git() {
@@ -202,7 +216,7 @@ fi
prompt
supportedsites
prepare
cleanup
update
changelog