2019-10-09 21:29:42 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
. .coverity.conf || exit 1
|
|
|
|
|
|
|
|
pre_submit_hook
|
|
|
|
|
|
|
|
## delete all previous tarballs
|
2019-11-17 18:45:20 +08:00
|
|
|
rm -f proxmark3.all.*.tgz proxmark3.all.*.log
|
2019-10-09 21:29:42 +08:00
|
|
|
|
|
|
|
TODAY="$(date --date now +%Y%m%d.%H%M)"
|
2019-10-09 23:53:45 +08:00
|
|
|
VERSION="0.1.$TODAY"
|
2019-10-09 22:54:09 +08:00
|
|
|
DESCNAME="manual_by_$NICKNAME.$TODAY.$(git describe --dirty --always)"
|
2019-10-09 21:29:42 +08:00
|
|
|
FILENAME="proxmark3.all.$TODAY.tgz"
|
|
|
|
LOGFILENAME="${FILENAME/.tgz/.log}"
|
|
|
|
|
|
|
|
## create tarball
|
|
|
|
tar cfz "$FILENAME" "$COVDIR" || exit $?
|
|
|
|
echo "Coverity build file is ready"
|
|
|
|
|
|
|
|
## upload tarball to Coverity.com
|
|
|
|
curl --progress-bar --fail \
|
|
|
|
--form token="$COVTOKEN" \
|
|
|
|
--form email="$COVLOGIN" \
|
|
|
|
--form file="@$FILENAME" \
|
|
|
|
--form version="$VERSION" \
|
|
|
|
--form description="$DESCNAME" \
|
|
|
|
https://scan.coverity.com/builds?project=Proxmark3+RRG+Iceman+repo | tee -a "${LOGFILENAME}" ; test "${PIPESTATUS[0]}" -eq 0 || exit $?
|
|
|
|
echo "tarball uploaded to Coverity for analyse"
|
|
|
|
|
|
|
|
post_submit_hook
|