Update Sentry Debug Upload File. (#13)

* sentry upload debug files
This commit is contained in:
Justin Hammond 2020-01-07 14:41:43 +08:00 committed by GitHub
parent b81fb24931
commit 0070b751bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,25 +12,44 @@ then
echo "Please Set the SENTRY_TOKEN enviroment variable"
exit -1
fi
#echo "deb http://deb.debian.org/debian-debug/ buster-debug main" > /etc/apt/sources.list.d/debug.list
#echo "deb http://deb.debian.org/debian-debug/ buster-proposed-updates-debug main" >> /etc/apt/sources.list.d/debug.list
#echo "deb http://deb.debian.org/debian-debug/ testing-debug main" >> /etc/apt/sources.list.d/debug.list
#echo "deb http://deb.debian.org/debian-debug/ unstable-debug main" >> /etc/apt/sources.list.d/debug.list
#echo "deb http://deb.debian.org/debian-debug/ experimental-debug main" >> /etc/apt/sources.list.d/debug.list
apt-get update
apt-get install -y curl
if [ ! -f /usr/local/bin/sentry-cli ]; then curl -sL https://sentry.io/get-cli/ | bash; fi
#apt-get install -t unstable libqt5core5a-dbgsym libqt5network5-dbgsym libqt5remoteobjects5-dbgsym
#rm /etc/apt/sources.list.d/debug.list
echo "deb http://deb.debian.org/debian-debug/ buster-debug main" > /etc/apt/sources.list.d/debug.list
echo "deb http://deb.debian.org/debian-debug/ buster-proposed-updates-debug main" >> /etc/apt/sources.list.d/debug.list
echo "deb http://deb.debian.org/debian-debug/ testing-debug main" >> /etc/apt/sources.list.d/debug.list
echo "deb http://deb.debian.org/debian-debug/ unstable-debug main" >> /etc/apt/sources.list.d/debug.list
echo "deb http://deb.debian.org/debian-debug/ experimental-debug main" >> /etc/apt/sources.list.d/debug.list
if [ ! -f /usr/local/bin/sentry-cli ]; then
apt-get update
apt-get install -y curl elfutils
apt-get install -y -t unstable libqt5core5a-dbgsym libqt5network5-dbgsym libqt5remoteobjects5-dbgsym
ARCH=`uname -m`
if [ "$ARCH" == "aarch64" ]; then
echo "Installing sentry-cli for arm64"
curl http://bamboo.my-ho.st/bamboo/browse/INFRA-SCL/latest/artifact/shared/sentry-cli-arm64/sentry-cli -o /usr/local/bin/sentry-cli
chmod +x /usr/local/bin/sentry-cli
elif [ "$ARCH" == "armv7l" ]; then
echo "Installing sentry-cli for armhf"
curl http://bamboo.my-ho.st/bamboo/browse/INFRA-SCL/latest/artifact/shared/sentry-cli-armhf/sentry-cli -o /usr/local/bin/sentry-cli
chmod +x /usr/local/bin/sentry-cli
else
echo "Installing sentry-cli for $ARCH"
curl -sL https://sentry.io/get-cli/ | bash
fi
fi
function findDBGFile() {
local DBGFILE
DBGFILE=`ls /usr/lib/debug/usr/$1* 2> /dev/null`
DBGFILE=`eu-unstrip -n -e $1 | awk '{print $4}'`
if (( $? != 0)); then
return 1
fi
echo $DBGFILE
return 0
if [ "$DBGFILE" == "-" ]; then
return 1
elif [ "$DBGFILE" == "." ]; then
return 1
else
echo $DBGFILE
return 0
fi
}
@ -44,17 +63,18 @@ ldd $EXECUTABLE | awk '{print $3}' |
useable=`sentry-cli difutil check $lib | grep "Usable: yes"`
if [ ! -z "$useable" ]; then
RP=`realpath $lib`
#DBGFILE=$(findDBGFile $lib)
#if (( $? == 0)); then
# LIBS+=" $DBGFILE"
#fi
DBGFILE=$(findDBGFile $lib)
if (( $? == 0)); then
LIBS+=" $DBGFILE"
fi
LIBS+=" $RP"
echo "Got Lib:" $RP " " $PKG " " $DBGFILE
echo "Got Lib:" $RP " " $DBGFILE
fi
fi
done
echo $LIBS /usr/local/bin/ozwdaemon
LIBS+=" /usr/local/lib/ozwdaemon"
echo $LIBS
sentry-cli --auth-token $SENTRY_TOKEN upload-dif -o openzwave -p qt-openzwave $LIBS --wait
}