diff options
| author | Stephen Cprek <smcprek@us.ibm.com> | 2015-12-10 12:56:10 -0600 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-12-17 15:56:57 -0600 |
| commit | aa8d169e4569d7ecf243194e404fc6db7216cf78 (patch) | |
| tree | 6dcdf5ad048b0440fd6a184ea3fac0226e4bcdd5 /src/build/tools/verify-commit | |
| parent | 4ea62ca340c8da822515bb4cac7d9bda3c19efa8 (diff) | |
| download | blackbird-hostboot-aa8d169e4569d7ecf243194e404fc6db7216cf78.tar.gz blackbird-hostboot-aa8d169e4569d7ecf243194e404fc6db7216cf78.zip | |
Fix copyright script to handle mirrored files
Change-Id: Ieaa34a747b1cfbea678586e54f8cfa950244e98b
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22763
Tested-by: Jenkins Server
Reviewed-by: PRACHI GUPTA <pragupta@us.ibm.com>
Reviewed-by: Richard J. Knight <rjknight@us.ibm.com>
Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/tools/verify-commit')
| -rwxr-xr-x | src/build/tools/verify-commit | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/build/tools/verify-commit b/src/build/tools/verify-commit index f4218293a..0ce44a286 100755 --- a/src/build/tools/verify-commit +++ b/src/build/tools/verify-commit @@ -30,6 +30,8 @@ my $issueFound = 0; my $errorFound = 0; my $projectName = $ENV{'PROJECT_NAME'}; +# Relative path of import tree from project root +my $importPrefix = $ENV{'IMPORT_REL_PATH'}."/"; verifyPatchSet(); # Verify the patch contents. verifyCommitMsg(); # Verify the commit message. @@ -124,6 +126,13 @@ sub verifyFileLine { my ($file,$line,$count) = @_; + # Check if file was mirrored + my $mirror = 0; + if ($file =~ m/^$importPrefix/) + { + $mirror = 1; + } + # Check line length. if (length($line) > 80) { @@ -180,8 +189,8 @@ sub verifyFileLine "NOMERGE tag found."); } - # Check for "Confidential". - if ($line =~ m/Confidential/i && $projectName =~ m/HostBoot/i) + # Check for "Confidential", unless it's a mirrored commit + if ($line =~ m/Confidential/i && $projectName =~ m/HostBoot/i && !$mirror) { unless (($file =~ m/verify-commit/) || ($file =~ m/addCopyright.pl/)) |

