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/applyTargetingStyle | |
| 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/applyTargetingStyle')
| -rwxr-xr-x | src/build/tools/applyTargetingStyle | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/build/tools/applyTargetingStyle b/src/build/tools/applyTargetingStyle new file mode 100755 index 000000000..7fc5d198d --- /dev/null +++ b/src/build/tools/applyTargetingStyle @@ -0,0 +1,20 @@ +#!/usr/bin/bash + +for var in "$@" +do + if [[ $var = *target_types*.xml ]] || [[ $var = *attribute_types*.xml ]] ; + then + echo "Applying targeting sort for file: " + echo " $var" + xsltproc $TOOLSDIR/sort_targeting.xsl $var > temp.xml + rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi + xsltproc $TOOLSDIR/insert_newlines.xsl temp.xml > $var + rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi + rm temp.xml + rc=$?; if [[ $rc != 0 ]]; + then + echo "rm $PROJECT_ROOT/temp.xml failed. Manual removal required." + fi + fi +done + |

