diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-04-26 11:53:54 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-04-26 11:53:54 +0100 |
commit | eeb001fcc1aabd8f077cd2846724120a3aa8f962 (patch) | |
tree | eef20d7d8c9d34bac047da1d5de139b6cbfa9a6f | |
parent | fffdbc71e95260cf9e6158d452af286fcaf6fc6a (diff) |
apply-pullreq: Add some more sanity checks
Check for some things that we've recently allowed to slip through
into master and shouldn't have:
* are we trying to do a merge after we did a release but
before we reopened the devtree?
* do any of the commits have the mailing list as the author
(as a result of SPF rewriting fallout)?
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-x | apply-pullreq | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apply-pullreq b/apply-pullreq index a5528e4..b0e8860 100755 --- a/apply-pullreq +++ b/apply-pullreq @@ -58,6 +58,17 @@ if [ "$(git rev-parse master)" != "$(git rev-parse staging)" ]; then exit 1 fi +# Check we're not accidentally trying to merge after the +# final release was tagged and before we reopened the devtree. +VER="$(cat VERSION)" +VERMIN="${VER##*.}" + +if [ "$VERMIN" = "0" ]; then + echo "VERSION says this a release version: forgot to reopen devtree?" + exit 1 +fi + + # Find the remote name corresponding to the URL. Note that we # assume that any protocol on the remote is the same thing, and # that a trailing ".git" makes no difference. This helps when @@ -104,6 +115,12 @@ if git diff master..staging | grep -q 'Subproject commit'; then echo "WARNING: pull appears to include submodule update, please check it!" fi +# Check whether any authors needs to be corrected after SPF rewrites +if git shortlog --author=qemu-devel@nongnu.org master..staging | grep .; then + echo "ERROR: pull request includes commits attributed to list" + exit 1 +fi + # This should exit with an error status if any of the sub-builds fails. parallel-buildtest |