Report number of changed jobs

Check how many jobs have been changed and report that number.
Do not abort if the diff or grep fails to find anything.

Change-Id: I7f655f65cbe4d5cd084af2bda645ba57697ba3be
This commit is contained in:
Andreas Jaeger 2016-03-11 17:09:44 +01:00
parent 91d4458b0a
commit 3498848692

View File

@ -43,9 +43,16 @@ cd .test/jenkins-job-builder
tox -e compare-xml-old
tox -e compare-xml-new
set +e
diff -r -N -u .test/old/out .test/new/out
CHANGED=$? # 0 == same ; 1 == different ; 2 == error
echo "======================="
echo "Number of changed jobs:"
diff -r -N -u .test/old/out .test/new/out |grep -c '^diff -r'
echo "======================="
set -e
echo
echo "You are in detached HEAD mode. If you are a developer"
echo "and not very familiar with git, you might want to do"