[scripts/release] add more checks before committing release
- check if CHANGELOG was updated - sync with origin/master
This commit is contained in:
@@ -6,5 +6,5 @@
|
|||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
__version__ = "1.31.3"
|
__version__ = "1.31.4-dev"
|
||||||
__variant__ = None
|
__variant__ = None
|
||||||
|
|||||||
@@ -150,15 +150,29 @@ changelog() {
|
|||||||
> "${CHANGELOG}"
|
> "${CHANGELOG}"
|
||||||
}
|
}
|
||||||
|
|
||||||
supportedsites() {
|
prepare() {
|
||||||
cd "${ROOTDIR}"
|
cd "${ROOTDIR}"
|
||||||
echo Checking if "${SUPPORTEDSITES}" is up to date
|
|
||||||
|
|
||||||
|
echo Checking if "${SUPPORTEDSITES}" is up to date
|
||||||
./scripts/supportedsites.py
|
./scripts/supportedsites.py
|
||||||
if ! git diff --quiet "${SUPPORTEDSITES}"; then
|
if ! git diff --quiet -- "${SUPPORTEDSITES}"; then
|
||||||
echo "updated ${SUPPORTEDSITES} contains changes"
|
echo "updated ${SUPPORTEDSITES} contains changes"
|
||||||
exit 4
|
exit 4
|
||||||
fi
|
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() {
|
upload-git() {
|
||||||
@@ -202,7 +216,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
prompt
|
prompt
|
||||||
supportedsites
|
prepare
|
||||||
cleanup
|
cleanup
|
||||||
update
|
update
|
||||||
changelog
|
changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user