Commit graph

37 commits

Author SHA1 Message Date
Eberhard Beilharz
12165d73bc
fix(linux): Fix logging
We can't initialize Sentry during module initialization because our
`initialize_sentry` logs some status info. Setting the logging level
later on is then a no-op, breaking verbose and very-verbose logging.

This change fixes this by putting Sentry initialization into a
separate method that gets called after we set the log level.

Also refactor some common code into methods that appear in all our
executables.
2023-07-19 19:47:28 +02:00
Eberhard Beilharz
7f9ef0d35b
feat(linux): Add option to disable Sentry
Closes #5027.
2023-05-30 18:32:28 +02:00
Marc Durdin
067028cec2 chore: revise tag variable name to VERSION_GIT_TAG
Introduce new $VERSION_GIT_TAG environment variable, and update all
references to release@version in all projects to use the new variable.
2023-01-21 17:02:50 +07:00
Marc Durdin
34ece2182d fix(common): update sentry release identifiers to support semver
Fixes #7895.

This should mean that Sentry reports start to track semantic versions. I
have reviewed each project and I _think_ I've captured all the locations
where we need to construct release identifiers. Note that one of them
was fixed from a plain version number.

Docs on release format: https://docs.sentry.io/platforms/node/guides/serverless-cloud/configuration/releases/#bind-the-version
2023-01-17 17:04:24 +07:00
Eberhard Beilharz
5ee9c2ead1
chore(linux): Don't report KeyboardInterrupt to Sentry
When the user presses Ctrl-C we don't want to create a Sentry
issue. This change ignores that exception.
2023-01-13 18:27:25 +01:00
Marc Durdin
f836574cbc chore: use keyman.com instead of keyman-staging.com
Fixes #7227.

We want to use keyman.com for now even for alpha builds, as
keyman-staging.com is going to be used for transition to Docker-based
hosting, and it will be problematic to try and share that process with
alpha builds.
2022-09-08 14:32:39 +10:00
Eberhard Beilharz
0b8e628812
chore(linux): Improve robustness
Don't crash if we encounter a corrupt file.
2022-01-28 18:37:55 +01:00
Eberhard Beilharz
20064ea42a fix(linux): fix release version number for Sentry reporting
Forgot to change the second occurrence of the version number for older
Sentry SDK.
2021-12-17 23:09:47 +01:00
Eberhard Beilharz
10c7d88eb9 fix(linux): fix release version number for Sentry reporting
Fixes #5817.
2021-12-15 10:52:21 +01:00
Marc Durdin
c951b35083 chore(linux): use secret in legacy sentry setup 2021-10-05 09:30:17 +11:00
Marc Durdin
3219b44624 chore: sentry.io dsn 2021-10-04 15:01:36 +11:00
Eberhard Beilharz
c3540e9f37
chore(linux): Fix uploading to Sentry
On local builds we shouldn't upload errors to Sentry. The
`build-utils.sh` script sets the `UPLOAD_SENTRY` environment variable
for that purpose. Also, Sentry doesn't like having an empty string
as pkgversion (which should no longer happen with the rest of this
change, but...)
2021-08-23 16:24:13 +02:00
Eberhard Beilharz
a2950bef7f
refactor(linux): Cleanup import of os.path
This change imports `os` instead of `os.path`. This is the
recommended way. It also reduces confusion whether to use
`os.path.whatever()` or just `path.whatever()`.
2021-08-04 12:24:07 +02:00
Eberhard Beilharz
3e938fe82c
fix(linux): Report Sentry related messages to stderr
This will make them not appear in the generated markdown help files.
2021-06-30 12:18:02 +02:00
Eberhard Beilharz
9fcddb8afa
fix(linux): Set userid instead of username
Username expects a string, so we set the userid instead.
2021-04-20 11:46:15 +02:00
Eberhard Beilharz
68f9fd315e
feat(linux): Use hash of username 2021-04-20 11:14:23 +02:00
Eberhard Beilharz
09fe5e86a5
feat(linux): Improve Sentry crash reporting
- don't log regular errors - those are handled and we report them
  to the user, but don't want to create a Sentry error
- log username in crash report
2021-04-19 18:56:06 +02:00
Eberhard Beilharz
63cefab0eb
chore(linux): Improve Sentry environment setting
When running from source we set the environment to `local` when
reporting to Sentry. This change also adds the package version and
the tier as additional Sentry tags.

This is a follow-up of PR #4581.
2021-03-04 16:01:52 +01:00
Eberhard Beilharz
96c688551d
Merge pull request #4581 from keymanapp/chore/linux/sentry
chore(linux): Don't report to Sentry in dev environment
2021-03-04 15:57:08 +01:00
Eberhard Beilharz
33bf5750b0
fix(linux): Improve version number
This change modifies the reported version number for km-config:
if km-config is installed from a debian package, the package
version will be output as well, e.g.:
`km-config version 14.0.252-beta (package version 14.0.252-1+bionic1)`

Otherwise the output will be identical to before:
`km-config version 14.0.252-beta-local`.

This change also modifies the script that sets the version number so
that builds on Jenkins are now detected in addition to TC.

This fixes #4579.
2021-03-03 20:01:34 +01:00
Eberhard Beilharz
0158e17636
chore(linux): Don't report to Sentry in dev environment
When the environment variable KEYMAN_NOSENTRY is set we'll skip
reporting to Sentry. This is helpful on development machines.
2021-03-03 19:37:27 +01:00
Eberhard Beilharz
bb20389dc4
fix(linux): Also use staging site for beta versions 2021-02-09 17:31:07 +01:00
Eberhard Beilharz
e862d3bfe5
chore(linux): Don't report on Sentry when running unit tests
When running unit tests we try to install some keyboards with
invalid URLs which normally results in an issue being reported on
Sentry. This change detects when we're running unit tests and
in that case doesn't initialize Sentry reporting.
2021-01-27 16:27:28 +01:00
Eberhard Beilharz
88637bb818
chore(linux): Don't report on Sentry when running unit tests
When running unit tests we try to install some keyboards with
invalid URLs which normally results in an issue being reported on
Sentry. This change sets an environment variable when running
the tests and modifies the initialization code to not initialize
Sentry reporting when the environment variable `KEYMAN_NOSENTRY`
is set to 1.
2021-01-27 15:59:49 +01:00
Darcy
1bf3fe936b fix(linux): Remove version.sh
Remove version.sh and determine version/tier from the .md files
2020-10-09 13:55:18 +07:00
Eberhard Beilharz
55125650fd
feat(linux): Package localizations
This change adds the localization files to the debian package. It
also updates the path to the localization files so that the installed
files will be found.
2020-08-24 19:31:18 +02:00
Eberhard Beilharz
11f018366b
feat(linux): Add i18n for Linux 2020-08-19 19:22:33 +02:00
Eberhard Beilharz
d9c71574f4
chore(linux): Merge branch 'master' into feat/linux/staging-hosts
# Conflicts:
#	linux/keyman-config/keyman_config/__init__.py
2020-08-13 15:49:48 +02:00
Eberhard Beilharz
4652a04581
feat(linux): Hook up Sentry for km-config 2020-07-24 19:43:18 +02:00
Eberhard Beilharz
dd1a257872
chore(linux): Unstage downloads
Currently there's no staging site for downloads.keyman.com.
2020-07-24 10:28:50 +02:00
Eberhard Beilharz
03cb1b210c
feat(linux): Add staging for downloads.keyman.com 2020-07-24 09:06:46 +02:00
Eberhard Beilharz
26fc7b48d2
feat(linux): Use new staging site names 2020-07-24 09:06:26 +02:00
Eberhard Beilharz
ba0a329cfd
feat(linux): Use staging URLs for alpha version 2020-07-17 19:22:51 +02:00
Darcy
ce5e994211 fix(linux): Use __release_version__ for downloadkeyboard window
As of 14.0, `resources/build/build-utils.sh` defines the build variables:
```
```

The go/linux links need an #.# version so this PR changes from __majorversion__ to __releaseversion__.
2020-03-23 16:07:38 +07:00
glasseyes
9dd7618e3f put __majorversion__ into version.py 2018-11-30 09:23:21 +07:00
glasseyes
85b49d957c manpages for keyman-config
also improve help output
and set the version in the module
2018-09-01 15:23:35 +07:00
glasseyes
51ebb7300a rename keymanconfig to keyman_config 2018-09-01 12:28:16 +07:00
Renamed from linux/keyman-config/keymanconfig/__init__.py (Browse further)