From 9e99f9953a90b0183e5b4c485e7e22167f72e7de Mon Sep 17 00:00:00 2001 From: Dawn Chen Date: Mon, 5 Jan 2015 13:27:30 -0800 Subject: [PATCH] Fix the boilerplate issue for header with "Copyright 2015". --- hooks/boilerplate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/boilerplate.sh b/hooks/boilerplate.sh index 42a8dd1511e..afd01f5a66d 100755 --- a/hooks/boilerplate.sh +++ b/hooks/boilerplate.sh @@ -28,9 +28,9 @@ fi LINES=$(cat "${REF_FILE}" | wc -l | tr -d ' ') if [[ "${EXT}" == "go" ]]; then # remove build tags from the top of Go file - DIFFER=$(cat "${FILE}" | sed '/\/\*/,$!d' | head "-${LINES}" | diff -q - "${REF_FILE}") + DIFFER=$(cat "${FILE}" | sed '/\/\*/,$!d' | sed 's/2015/2014/g' | head "-${LINES}" | diff -q - "${REF_FILE}") else - DIFFER=$(head "-${LINES}" "${FILE}" | diff -q - "${REF_FILE}") + DIFFER=$(head "-${LINES}" "${FILE}" | sed 's/2015/2014/g' | diff -q - "${REF_FILE}") fi if [[ -z "${DIFFER}" ]]; then