build: add helpers to upload coverity tarball
diff --git a/.gitignore b/.gitignore
index f60cac6..58ef42a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,6 +17,7 @@
/config.status
/configure
/coverage
+/cov-int
/libtool
/stamp-h1
/test-suite.log
diff --git a/Makefile.am b/Makefile.am
index b09c25f..b74e190 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -411,6 +411,31 @@
endif
# ------------------------------------------------------------------------------
+# coverity
+# ------------------------------------------------------------------------------
+
+kmod-coverity-%.tar.xz:
+ rm -rf $< cov-int
+ ./bootstrap-configure --disable-python --disable-manpages
+ make clean
+ cov-build --dir cov-int make -j 4
+ tar caf $@ cov-int
+
+coverity-tar: kmod-coverity-$(shell git describe).tar.xz
+
+coverity-sync: kmod-coverity-$(shell git describe).tar.xz
+ @echo "uploading coverity tarball"
+ @curl --form token=$(COVERITY_KMOD_TOKEN) \
+ --form email=lucas.de.marchi@gmail.com \
+ --form file=@$< \
+ --form version="$(shell git describe)" \
+ --form description="" \
+ https://scan.coverity.com/builds?project=kmod
+
+coverity-clean:
+ rm -rf kmod-coverity-*.tar.xz cov-int
+
+# ------------------------------------------------------------------------------
# custom release helpers
# ------------------------------------------------------------------------------