diff --git a/linux/debian/rules b/linux/debian/rules index 7137b5660c..5effa0a117 100755 --- a/linux/debian/rules +++ b/linux/debian/rules @@ -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 $@ diff --git a/linux/keyman-config/keyman_config/__init__.py b/linux/keyman-config/keyman_config/__init__.py index a96825dede..9c8e8247c4 100644 --- a/linux/keyman-config/keyman_config/__init__.py +++ b/linux/keyman-config/keyman_config/__init__.py @@ -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( diff --git a/linux/keyman-config/keyman_config/version.py.in b/linux/keyman-config/keyman_config/version.py.in index 49d5e84b13..8895a648d2 100644 --- a/linux/keyman-config/keyman_config/version.py.in +++ b/linux/keyman-config/keyman_config/version.py.in @@ -9,5 +9,6 @@ __versionwithtag__ = "_VERSIONWITHTAG_" __majorversion__ = "_MAJORVERSION_" __releaseversion__ = "_RELEASEVERSION_" __tier__ = "_TIER_" -__pkgversion__ = "" +__pkgversion__ = "(local)" __environment__ = "_ENVIRONMENT_" +__uploadsentry__ = "_UPLOADSENTRY_" diff --git a/linux/scripts/reconf.sh b/linux/scripts/reconf.sh index a2a111394e..4bd3d63210 100755 --- a/linux/scripts/reconf.sh +++ b/linux/scripts/reconf.sh @@ -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