gplugin/builders

Parents cd5294f8a6ce
Children 57734698ef51
Clean up or dirty test for clang format and redirect stderr to /dev/null
--- a/clang-format/build.sh Wed Sep 16 22:48:28 2020 -0500
+++ b/clang-format/build.sh Thu Sep 24 01:20:42 2020 -0500
@@ -23,6 +23,11 @@
ninja -C ${BUILD_DIR} clang-format
hg diff 2>/dev/null
-[ -n $(hg id -T '{dirty}') ] && exit 1
+# if hg id -T returns a + it means the tree is dirty so revert it and exit 1
+DIRTY=$(hg id -T '{dirty}' 2>/dev/null)
+if [ -n "${DIRTY}" ] ; then
+ hg revert -C --all 2>/dev/null
+ exit 1
+fi