mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
style
This commit is contained in:
parent
cdc7955821
commit
f3a9629895
3 changed files with 43 additions and 16 deletions
33
covsubmit.sh
33
covsubmit.sh
|
@ -5,6 +5,37 @@ set -e
|
|||
|
||||
pre_submit_hook
|
||||
|
||||
echo "Checking upload permissions..."
|
||||
|
||||
if ! up_perm="$(wget https://scan.coverity.com/api/upload_permitted --post-data "token=${COVTOKEN}&project=${COVPROJECT}" -q -O -)"; then
|
||||
echo "Coverity Scan API access denied: bad token?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Really up_perm is a JSON response with either
|
||||
# {upload_permitted:true} or {next_upload_permitted_at:<date>}
|
||||
# We do some hacky string parsing instead of properly parsing it.
|
||||
case "$up_perm" in
|
||||
*upload_permitted*true*)
|
||||
echo "Coverity Scan: upload permitted"
|
||||
;;
|
||||
*next_upload_permitted_at*)
|
||||
if [ -z "$COVERITY_DRYRUN" ]; then
|
||||
echo "Coverity Scan: upload quota reached; stopping here"
|
||||
# Exit success as this isn't a build error.
|
||||
exit 0
|
||||
else
|
||||
echo "Coverity Scan: upload quota reached, continuing dry run"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Coverity Scan upload check: unexpected result $up_perm"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
## delete all previous tarballs
|
||||
rm -f proxmark3.all.*.tgz proxmark3.all.*.log
|
||||
|
||||
|
@ -25,7 +56,7 @@ curl --progress-bar --fail \
|
|||
--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 $?
|
||||
https://scan.coverity.com/builds?project="${COVPROJECT}" | tee -a "${LOGFILENAME}" ; test "${PIPESTATUS[0]}" -eq 0 || exit $?
|
||||
echo "tarball uploaded to Coverity for analyse"
|
||||
|
||||
post_submit_hook
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue