Merge pull request #1327 from Pondorasti/patch-1
[RRG-proxmark3.git] / covsubmit.sh
blob61ca853f13385c89232b7e5d3ef8237f546549cd
1 #!/usr/bin/env bash
3 set -e
4 . .coverity.conf || exit 1
6 pre_submit_hook
8 ## delete all previous tarballs
9 rm -f proxmark3.all.*.tgz proxmark3.all.*.log
11 TODAY="$(date --date now +%Y%m%d.%H%M)"
12 VERSION="0.1.$TODAY"
13 DESCNAME="manual_by_$NICKNAME.$TODAY.$(git describe --dirty --always)"
14 FILENAME="proxmark3.all.$TODAY.tgz"
15 LOGFILENAME="${FILENAME/.tgz/.log}"
17 ## create tarball
18 tar cfz "$FILENAME" "$COVDIR" || exit $?
19 echo "Coverity build file is ready"
21 ## upload tarball to Coverity.com
22 curl --progress-bar --fail \
23 --form token="$COVTOKEN" \
24 --form email="$COVLOGIN" \
25 --form file="@$FILENAME" \
26 --form version="$VERSION" \
27 --form description="$DESCNAME" \
28 https://scan.coverity.com/builds?project=Proxmark3+RRG+Iceman+repo | tee -a "${LOGFILENAME}" ; test "${PIPESTATUS[0]}" -eq 0 || exit $?
29 echo "tarball uploaded to Coverity for analyse"
31 post_submit_hook