diff options
author | Federico Ceratto <federico.ceratto@gmail.com> | 2016-11-23 15:49:10 +0000 |
---|---|---|
committer | Federico Ceratto <federico.ceratto@gmail.com> | 2016-11-23 15:49:10 +0000 |
commit | 87649cf32bd0e14d5a903fb85b01e9f41a253540 (patch) | |
tree | bbefda6dac074aeb87529592e8e5064f69cbe024 /coverity-scan.sh | |
parent | Imported Upstream version 1.3.0+dfsg (diff) | |
download | netdata-87649cf32bd0e14d5a903fb85b01e9f41a253540.tar.xz netdata-87649cf32bd0e14d5a903fb85b01e9f41a253540.zip |
New upstream version 1.4.0+dfsgupstream/1.4.0+dfsg
Diffstat (limited to 'coverity-scan.sh')
-rwxr-xr-x | coverity-scan.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/coverity-scan.sh b/coverity-scan.sh new file mode 100755 index 00000000..6bb18e41 --- /dev/null +++ b/coverity-scan.sh @@ -0,0 +1,39 @@ +#/bin/bash + +token= +[ -f .coverity-token ] && token="$(<.coverity-token)" +[ -z "${token}" ] && \ + echo >&2 "Save the coverity token to .coverity-token" && \ + exit 1 + +echo >&2 "Coverity token: ${token}" + +covbuild="$(which cov-build 2>/dev/null || command -v cov-build 2>/dev/null)" +[ -z "${covbuild}" -a -f .coverity-build ] && covbuild="$(<.coverity-build)" +[ -z "${covbuild}" ] && \ + echo "Save command the full filename of cov-build in .coverity-build" && \ + exit 1 + +[ ! -x "${covbuild}" ] && \ + echo "The command ${covbuild} is not executable. Save command the full filename of cov-build in .coverity-build" && \ + exit 1 + +echo >&2 "Cleaning up old builds..." +make clean || exit 1 + +[ -d "cov-int" ] && \ + rm -rf "cov-int" + +[ -f netdata-coverity-analysis.tgz ] && \ + rm netdata-coverity-analysis.tgz + +"${covbuild}" --dir cov-int make -j4 || exit 1 + +tar czvf netdata-coverity-analysis.tgz cov-int || exit 1 + +curl --form token="${token}" \ + --form email=costa@tsaousis.gr \ + --form file=@netdata-coverity-analysis.tgz \ + --form version="1.3.0rc1" \ + --form description="Description" \ + https://scan.coverity.com/builds?project=firehol%2Fnetdata |