scripts: pre-submit: ABI dump update requires a changelog entry
Change-Id: I5521a8356e0cc795bd0551aaddad354598d75c1e
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/scripts/changelog.awk b/scripts/changelog.awk
index e1644e6..b891893 100644
--- a/scripts/changelog.awk
+++ b/scripts/changelog.awk
@@ -1,4 +1,5 @@
-BEGIN { cl = 0; api = 0; }
+BEGIN { cl=0; api=0; abi=0; }
/^CHANGELOG.md$/ { cl=1 }
/^include[/]libpldm/ { api=1 }
-END { exit !(cl || !api); }
+/^abi[/]/ { abi=1 }
+END { exit !(cl || !(api || abi)); }
diff --git a/scripts/pre-submit b/scripts/pre-submit
index cd5186a..b8f3fb9 100755
--- a/scripts/pre-submit
+++ b/scripts/pre-submit
@@ -14,12 +14,12 @@
exit 1
fi
-# Make sure if the change touches the public headers, it also updates the
-# changelog.
-if ! git show --format="" --name-only HEAD -- CHANGELOG.md include/libpldm |
+# Make sure if the change touches the public headers or ABI dump, it also
+# updates the changelog.
+if ! git show --format="" --name-only HEAD -- CHANGELOG.md abi include/libpldm |
awk -f scripts/changelog.awk
then
- echo You must document your changes under include/libpldm in CHANGELOG.md
+ echo Add a CHANGELOG entry to document updates under abi/ and include/libpldm/
exit 1
fi