summary refs log tree commit diff
path: root/scripts-dev/check-newsfragment
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-02-26 21:13:41 +0000
committerAmber Brown <hawkowl@atleastfornow.net>2019-02-26 13:13:41 -0800
commit57426ec6a377015925d643576efa9ef3efd63fda (patch)
treefea43ac01da91afb4fc1c2ec349c44d42be19f30 /scripts-dev/check-newsfragment
parentFix apache reverse proxy example (#4742) (diff)
downloadsynapse-57426ec6a377015925d643576efa9ef3efd63fda.tar.xz
Fix check-newsfragment script (#4750)
* Fix check-newsfragment script

I previously broke this so that it always succeeded...

* more fixes

* fix newsfiles
Diffstat (limited to '')
-rwxr-xr-xscripts-dev/check-newsfragment11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts-dev/check-newsfragment b/scripts-dev/check-newsfragment
index 5da093e168..e4a22bae61 100755
--- a/scripts-dev/check-newsfragment
+++ b/scripts-dev/check-newsfragment
@@ -6,7 +6,8 @@
 set -e
 
 # make sure that origin/develop is up to date
-git fetch origin develop
+git remote set-branches --add origin develop
+git fetch --depth=1 origin develop
 
 UPSTREAM=origin/develop
 
@@ -25,11 +26,15 @@ if git diff --name-only $UPSTREAM... | grep -qv '^develop/'; then
     tox -e check-newsfragment
 fi
 
+echo
+echo "--------------------------"
+echo
+
 # check that any new newsfiles on this branch end with a full stop.
-for f in git diff --name-only $UPSTREAM... -- changelog.d; do
+for f in `git diff --name-only $UPSTREAM... -- changelog.d`; do
     lastchar=`tr -d '\n' < $f | tail -c 1`
     if [ $lastchar != '.' ]; then
-        echo "Newsfragment $f does not end with a '.'" >&2
+        echo -e "\e[31mERROR: newsfragment $f does not end with a '.'\e[39m" >&2
         exit 1
     fi
 done