4 [ -f .coverity-token ] && token="$(<.coverity-token)"
6 echo >&2 "Save the coverity token to .coverity-token" && \
9 echo >&2 "Coverity token: ${token}"
11 covbuild="$(which cov-build 2>/dev/null || command -v cov-build 2>/dev/null)"
12 [ -z "${covbuild}" -a -f .coverity-build ] && covbuild="$(<.coverity-build)"
13 [ -z "${covbuild}" ] && \
14 echo "Save command the full filename of cov-build in .coverity-build" && \
17 [ ! -x "${covbuild}" ] && \
18 echo "The command ${covbuild} is not executable. Save command the full filename of cov-build in .coverity-build" && \
21 version="$(cat config.h | grep "^#define PACKAGE_VERSION" | cut -d '"' -f 2)"
22 echo >&2 "Working on netdata version: ${version}"
24 echo >&2 "Cleaning up old builds..."
30 [ -f netdata-coverity-analysis.tgz ] && \
31 rm netdata-coverity-analysis.tgz
33 "${covbuild}" --dir cov-int make -j4 || exit 1
35 tar czvf netdata-coverity-analysis.tgz cov-int || exit 1
37 curl --form token="${token}" \
38 --form email=costa@tsaousis.gr \
39 --form file=@netdata-coverity-analysis.tgz \
40 --form version="${version}" \
41 --form description="netdata, real-time performance monitoring, done right." \
42 https://scan.coverity.com/builds?project=firehol%2Fnetdata