mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
Merge pull request #5623 from keymanapp/chore/linux/sentry
chore(linux): Fix uploading to Sentry
This commit is contained in:
commit
d8ec847b6a
4 changed files with 9 additions and 4 deletions
|
|
@ -39,7 +39,7 @@ override_dh_auto_build:
|
|||
# keyman-config
|
||||
cd linux/keyman-config && \
|
||||
make man && \
|
||||
sed -i -e "s/^__pkgversion__ = \"\"/__pkgversion__ = \"$(DEB_VERSION)\"/g" keyman_config/version.py && \
|
||||
sed -i -e "s/^__pkgversion__ = \"[^\"]*\"/__pkgversion__ = \"$(DEB_VERSION)\"/g" keyman_config/version.py && \
|
||||
make compile-po
|
||||
dh_auto_build --sourcedir=linux/keyman-config --buildsystem=pybuild $@
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ from .version import __releaseversion__
|
|||
from .version import __tier__
|
||||
from .version import __pkgversion__
|
||||
from .version import __environment__
|
||||
from .version import __uploadsentry__
|
||||
|
||||
|
||||
def _(txt):
|
||||
|
|
@ -42,6 +43,8 @@ if 'unittest' in sys.modules.keys():
|
|||
print('Not reporting to Sentry', file=sys.stderr)
|
||||
elif os.environ.get('KEYMAN_NOSENTRY'):
|
||||
print('Not reporting to Sentry because KEYMAN_NOSENTRY environment variable set', file=sys.stderr)
|
||||
elif not __uploadsentry__:
|
||||
print('Not reporting to Sentry because UPLOAD_SENTRY is false (%s)' % __environment__, file=sys.stderr)
|
||||
else:
|
||||
try:
|
||||
# Try new sentry-sdk first
|
||||
|
|
@ -51,8 +54,8 @@ else:
|
|||
HaveSentryNewSdk = True
|
||||
|
||||
sentry_logging = LoggingIntegration(
|
||||
level=logging.INFO, # Capture info and above as breadcrumbs
|
||||
event_level=logging.CRITICAL # Send critical errors as events
|
||||
level=logging.INFO, # Capture info and above as breadcrumbs
|
||||
event_level=logging.CRITICAL # Send critical errors as events
|
||||
)
|
||||
SentryUrl = "https://1d0edbf2d0dc411b87119b6e92e2c357@sentry.keyman.com/12"
|
||||
sentry_sdk.init(
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@ __versionwithtag__ = "_VERSIONWITHTAG_"
|
|||
__majorversion__ = "_MAJORVERSION_"
|
||||
__releaseversion__ = "_RELEASEVERSION_"
|
||||
__tier__ = "_TIER_"
|
||||
__pkgversion__ = ""
|
||||
__pkgversion__ = "(local)"
|
||||
__environment__ = "_ENVIRONMENT_"
|
||||
__uploadsentry__ = "_UPLOADSENTRY_"
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ for proj in ${extra_projects}; do
|
|||
-e "s/_RELEASEVERSION_/${VERSION_RELEASE}/g" \
|
||||
-e "s/_TIER_/${TIER}/g" \
|
||||
-e "s/_ENVIRONMENT_/${VERSION_ENVIRONMENT}/g" \
|
||||
-e "s/_UPLOADSENTRY_/${UPLOAD_SENTRY}/g" \
|
||||
version.py.in > version.py
|
||||
cd ../buildtools && python3 ./build-langtags.py
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue