[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
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
__version__ = "1.31.3"
|
||||
__version__ = "1.31.4-dev"
|
||||
__variant__ = None
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user