File tree Expand file tree Collapse file tree 3 files changed +14
-17
lines changed Expand file tree Collapse file tree 3 files changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,7 @@ report_to_sentry() {
5959 curl -sL https://sentry.io/get-cli/ | bash
6060 fi
6161 # Report to sentry-dev-env project
62- SENTRY_DSN=
" https://[email protected] /5723503" \
63- sentry-cli send-event -m " $error_message " --logfile " $_SENTRY_LOG_FILE " --level $log_level
62+ sentry-cli send-event -m " $error_message " --logfile " $_SENTRY_LOG_FILE " --level $log_level
6463 rm " $_SENTRY_LOG_FILE "
6564}
6665
143142if [ -n " ${SENTRY_DEVENV_NO_REPORT+x} " ]; then
144143 debug " No development environment errors will be reported (since you've defined SENTRY_DEVENV_NO_REPORT)."
145144else
145+ # This is necessary for the bash-hook in lib.sh to work
146+ export SENTRY_DSN=
" https://[email protected] /5723503" 146147 # Since direnv traps the EXIT signal we place the temp file under /tmp for the odd time
147148 # the script will use the EXIT path
148149 _SENTRY_LOG_FILE=$( mktemp /tmp/sentry.envrc.$$ .out || mktemp /tmp/sentry.envrc.XXXXXXXX.out)
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ if sys.version_info.major < 3:
1616try :
1717 import sentry_sdk
1818
19- if not os .environ .get ("SENTRY_DEVENV_NO_REPORT " ):
20- sentry_sdk .
init (
dsn = "https://[email protected] /5723503" )
19+ if os .environ .get ("SENTRY_DSN " ):
20+ sentry_sdk .init (dsn = os . environ [ "SENTRY_DSN" ] )
2121 else :
2222 sys .stdout .write (
2323 "WARNING: Errors in this file will not be reported to Sentry since SENTRY_DSN is not set.\n "
Original file line number Diff line number Diff line change @@ -14,19 +14,6 @@ if [ -z "${CI+x}" ]; then
1414 green=" $( tput setaf 2) "
1515 yellow=" $( tput setaf 3) "
1616 reset=" $( tput sgr0) "
17- if [ -z " ${SENTRY_DEVENV_NO_REPORT+x} " ]; then
18- sentry_cli_major_version=" $( sentry-cli --version | awk ' {print $2}' | sed ' s/\([0-9]*\).*/\1/' ) "
19- # XXX: Until we support version 2.x
20- if [ $sentry_cli_major_version -lt 2 ]; then
21- # sentry-dev-env project
22- export SENTRY_DSN=
" https://[email protected] /5723503" 23- eval " $( sentry-cli bash-hook) "
24- else
25- echo " You are using the latest major release of sentry-cli."
26- echo " ${yellow} Please remove it and we will install the correct version: rm $( which sentry-cli) ${reset} "
27- exit 1
28- fi
29- fi
3017fi
3118
3219venv_name=" .venv"
@@ -46,6 +33,15 @@ configure-sentry-cli() {
4633 # XXX: Temporary install version 1.74.3 until we upgrade to version 2.x
4734 curl -sL https://gist.githubusercontent.com/armenzg/96481b0b653ecf807900373f5af09816/raw/caf5695e0eb6c214ec84f9fc217965aec928acc0/get-cli.sh | bash
4835 fi
36+ sentry_cli_major_version=" $( sentry-cli --version | awk ' {print $2}' | sed ' s/\([0-9]*\).*/\1/' ) "
37+ # XXX: Until we support version 2.x
38+ if [ $sentry_cli_major_version -lt 2 ]; then
39+ eval " $( sentry-cli bash-hook) "
40+ else
41+ echo " You are using the latest major release of sentry-cli."
42+ echo " ${yellow} Please remove it and we will install the correct version: rm $( which sentry-cli) ${reset} "
43+ exit 1
44+ fi
4945 fi
5046}
5147
You can’t perform that action at this time.
0 commit comments