From e266aacaa6aa7dd823edf700c5be8dce4b92ec5b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Christophe=20Beaupr=C3=A9?= Date: Mon, 29 Sep 2014 15:03:35 -0400 Subject: [PATCH] misc/jenkins: fix checklicense.sh MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * Correct documentation. * Fix the regular expression for the sought comment. Signed-off-by: Jean-Christophe Beaupré --- misc/jenkins/checklicense.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/jenkins/checklicense.sh b/misc/jenkins/checklicense.sh index 3a28ae4..3fcd8af 100755 --- a/misc/jenkins/checklicense.sh +++ b/misc/jenkins/checklicense.sh @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Check missing signed-off-by in commits +# Check missing "This file is part of NIT…" comment in committed scripts. if test "$#" -lt 2; then echo "Usage: checklicense from to" @@ -28,5 +28,5 @@ err=0 git diff --name-status $from..$to -- "*.nit" "*.sh" | sed -n 's/^A\s*//p' > checklicense_new_files.out test -s checklicense_new_files.out || exit 0 -grep -L 'his file is part of NIT' `cat checklicense_new_files.out` 2>/dev/null | tee checklicense_missing.out +grep -L '\(^\|\b\)# [Tt]his file is part of NIT ' `cat checklicense_new_files.out` 2>/dev/null | tee checklicense_missing.out test \! -s checklicense_missing.out -- 1.7.9.5