diff options
author | Matt Raybuck <mraybuc@us.ibm.com> | 2018-09-07 08:59:11 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-09-11 15:18:41 -0500 |
commit | 9b59223389e768975850f0c8bf44d7a2c7135fcf (patch) | |
tree | 59198864bab536df715ca02163be5ba3cb0e06aa /src/build/tools/pre-commit-actions | |
parent | 60d11f6f5f0720d2740cf990351c25d0f6bcd9c7 (diff) | |
download | talos-hostboot-9b59223389e768975850f0c8bf44d7a2c7135fcf.tar.gz talos-hostboot-9b59223389e768975850f0c8bf44d7a2c7135fcf.zip |
Add commit hook to sort the attribute xml files
When xml files were changed it would produce an instant merge
conflict. To resolve this issue a pre-commit hook was added that
will sort the xml attributes by id preventing instant conflicts.
Change-Id: Iffea1abfab459c542fe4f961616e0b5b4062804f
RTC: 180350
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65894
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Reviewed-by: Roland Veloz <rveloz@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>
Diffstat (limited to 'src/build/tools/pre-commit-actions')
-rwxr-xr-x | src/build/tools/pre-commit-actions | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/build/tools/pre-commit-actions b/src/build/tools/pre-commit-actions index d47dfff74..a914663d2 100755 --- a/src/build/tools/pre-commit-actions +++ b/src/build/tools/pre-commit-actions @@ -6,7 +6,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2015,2016 +# Contributors Listed Below - COPYRIGHT 2015,2018 # [+] International Business Machines Corp. # # @@ -28,6 +28,7 @@ # the code beautifier astyle. my $copyrightScript = "addCopyright"; +my $xmlSortingScript = "applyTargetingStyle"; ## Make up a list of all staged files ( --cached --name-only ) ## Filter for only Added or Modified ( --diff-filter=AM ) @@ -43,6 +44,9 @@ if ( @fileList ) system "$ENV{'TOOLSDIR'}/$copyrightScript update @fileList"; die("$?") if ($? != 0); + system "$ENV{'TOOLSDIR'}/$xmlSortingScript @fileList"; + die("$?") if ($? != 0); + system "git add @fileList"; exit 1 if ($? != 0); } |