diff options
author | Sumit Kumar <sumit_kumar@in.ibm.com> | 2018-05-14 07:23:42 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-05-16 15:39:53 -0400 |
commit | eb3bc77cbaf3c4b2eaf07bbdb2ff86750bb7bd87 (patch) | |
tree | bed0f800d59f9797e75a63ae75645dbcd962cd84 | |
parent | 29bde9b906c9c7bc1ba45b7bfef6d9c7ef1ecfca (diff) | |
download | talos-hostboot-eb3bc77cbaf3c4b2eaf07bbdb2ff86750bb7bd87.tar.gz talos-hostboot-eb3bc77cbaf3c4b2eaf07bbdb2ff86750bb7bd87.zip |
Add check for copyright date if its begin-end years same
Change-Id: I7ccf73f1605b3e971f6babf3cdd4a6baa9806688
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58753
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rwxr-xr-x | src/build/tools/addCopyright | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/build/tools/addCopyright b/src/build/tools/addCopyright index 22453d551..c43f9f323 100755 --- a/src/build/tools/addCopyright +++ b/src/build/tools/addCopyright @@ -683,7 +683,18 @@ sub createYearString($) # The list of years starts with the years in the current prolog and the # current release year. - my @years = ( @CopyRightYears, $ReleaseYear ); + my @years = (); + + # Get size of arrar @CopyRightYears + my $size = @CopyRightYears; + if ( $size < 2 ) ## If less than 2 then date entry has only a year mentioned + { + @years = @CopyRightYears; + } + else + { + @years = ( @CopyRightYears, $ReleaseYear ); + } ## Make a call to git to find the earliest commit date of the file ## new files will not have a log, so the "git log" call above will |