mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 02:53:25 -08:00
[CrashReporting] Send PROJECT_VERSION as the Sentry release
main() reported VERSION_STRING (PROJECT_VERSION_FRIENDLY) as the Sentry release — that carries a build date, so every build of the same version landed in its own release, and it never matched the installer, which reports CPACK/PROJECT_VERSION. Bake COCKATRICE_SENTRY_RELEASE= PROJECT_VERSION instead: date-free, identical between client and installer, and derived from the git tag on tag builds, so events, symbol uploads and the installer log all group under one release.
This commit is contained in:
parent
2a21c87e7c
commit
8ddb9b9570
3 changed files with 11 additions and 1 deletions
|
|
@ -32,6 +32,12 @@ function(cockatrice_target_enable_crash_reporting _target)
|
|||
endif()
|
||||
# Always baked in (possibly empty): main() prefers the COCKATRICE_SENTRY_DSN env var at runtime.
|
||||
target_compile_definitions(${_target} PRIVATE "COCKATRICE_SENTRY_DSN=\"${COCKATRICE_SENTRY_DSN}\"")
|
||||
# Sentry release for events from this target: PROJECT_VERSION (getversion.cmake ran before this
|
||||
# file was included). Deliberately not PROJECT_VERSION_FRIENDLY / VERSION_STRING — that carries
|
||||
# a build date, so every build of the same version would land in a different Sentry release.
|
||||
# PROJECT_VERSION matches what the installer reports in its own log and what CPack derives the
|
||||
# package version from, so client and installer events group under one release.
|
||||
target_compile_definitions(${_target} PRIVATE "COCKATRICE_SENTRY_RELEASE=\"${PROJECT_VERSION}\"")
|
||||
endfunction()
|
||||
|
||||
if(WITH_CRASH_REPORTING AND WITH_CLIENT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue