diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2014-01-09 14:38:02 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-01-10 11:56:40 -0600 |
commit | 908baf329747b078d6604741cd4734300a70bacb (patch) | |
tree | f864ae4706a51306c6a9753dd94f438629766a7f /src/build/tools | |
parent | e4437bf33f4d312758acf07c7b7f1e294f46ddf9 (diff) | |
download | talos-hostboot-908baf329747b078d6604741cd4734300a70bacb.tar.gz talos-hostboot-908baf329747b078d6604741cd4734300a70bacb.zip |
Resolve beginning of year copyright failures.
Change-Id: If7b058cf5540729799790c521ff87a495f14b756
Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/tools')
-rwxr-xr-x | src/build/tools/addCopyright.pl | 4 | ||||
-rwxr-xr-x | src/build/tools/copyright-check.sh | 34 |
2 files changed, 23 insertions, 15 deletions
diff --git a/src/build/tools/addCopyright.pl b/src/build/tools/addCopyright.pl index d9311d34c..8973d5a32 100755 --- a/src/build/tools/addCopyright.pl +++ b/src/build/tools/addCopyright.pl @@ -6,7 +6,7 @@ # # IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2011-2012 +# COPYRIGHT International Business Machines Corp. 2011,2014 # # p1 # @@ -64,6 +64,8 @@ use lib dirname (__FILE__); my $ReleaseYear = `date +%Y`; chomp( $ReleaseYear ); +$ReleaseYear = $ENV{'DATE_OVERRIDE'} if defined $ENV{'DATE_OVERRIDE'}; + my $copyrightSymbol = ""; # my $copyrightSymbol = "(C)"; # Uncomment if unable to use character. diff --git a/src/build/tools/copyright-check.sh b/src/build/tools/copyright-check.sh index e2f2421cd..2702bc10b 100755 --- a/src/build/tools/copyright-check.sh +++ b/src/build/tools/copyright-check.sh @@ -1,26 +1,26 @@ #!/bin/sh -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. # -# $Source: src/build/tools/copyright-check.sh $ +# $Source: src/build/tools/copyright-check.sh $ # -# IBM CONFIDENTIAL +# IBM CONFIDENTIAL # -# COPYRIGHT International Business Machines Corp. 2011 +# COPYRIGHT International Business Machines Corp. 2011,2014 # -# p1 +# p1 # -# Object Code Only (OCO) source materials -# Licensed Internal Code Source Materials -# IBM HostBoot Licensed Internal Code +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code # -# The source code for this program is not published or other- -# wise divested of its trade secrets, irrespective of what has -# been deposited with the U.S. Copyright Office. +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. # -# Origin: 30 +# Origin: 30 # -# IBM_PROLOG_END +# IBM_PROLOG_END_TAG # # Front end to addCopyright.pl - script to check for copyright block during @@ -32,6 +32,12 @@ export ADDCOPYRIGHT=${WORKSPACE_DIR}/src/build/tools/addCopyright.pl ## run git show to get a list of checked in files CHECKINFILES=`git show --pretty=format: --name-only -n1 | tr '\n' ' '` +## use git log to determine the year of the commit. +## Since commits have their copyright updated at the time they are +## committed, a commit might have a copyright date in its prolog of +## last year. Set the DATE_OVERRIDE variable to the 'validate' to allow +## slightly-old prologs (ie. ones corresponding to the date in the msg). +export DATE_OVERRIDE=`git log -n1 --date=short | grep "Date" | sed "s/Date: *//" | sed "s/-.*//"` echo "========================================================================" |