summaryrefslogtreecommitdiff
path: root/coverity.sh
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-19 14:19:20 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-19 14:27:33 +0100
commit2c815bb12b9ebea113dad1dfb69867bbaf78193c (patch)
tree862f57f30a6ba5c14edb3ddb0ca8b53d6547fb2e /coverity.sh
parente29f695f32b86918277dcc226d613e85cb5b838e (diff)
Add a script to semi-automate coverity scan submissions
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'coverity.sh')
-rwxr-xr-xcoverity.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/coverity.sh b/coverity.sh
new file mode 100755
index 0000000..37bc594
--- /dev/null
+++ b/coverity.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+COVERITY_PATH="$HOME/Downloads/cov-analysis-linux64-2019.03"
+TOKEN=$(cat "$HOME/.coverity/squashfs-tools-ng")
+EMAIL=$(git log --follow --pretty=format:"%ae" -- coverity.sh | head -n 1)
+
+DESCRIPTION=$(git describe --always --tags --dirty)
+VERSION=$(grep AC_INIT configure.ac | grep -o \\[[0-9.]*\\] | tr -d [])
+
+export PATH="$COVERITY_PATH/bin:$PATH"
+
+./autogen.sh
+./configure
+make clean
+cov-build --dir cov-int make -j
+tar czvf squashfs-tools-ng.tgz cov-int
+
+echo "Uploading tarball with the following settings:"
+echo "Email: $EMAIL"
+echo "Version: $VERSION"
+echo "Description: $DESCRIPTION"
+
+curl --form token="$TOKEN" \
+ --form email="$EMAIL" \
+ --form file=@squashfs-tools-ng.tgz \
+ --form version="$VERSION" \
+ --form description="$DESCRIPTION" \
+ https://scan.coverity.com/builds?project=squashfs-tools-ng