mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Set a release for sentry
This commit is contained in:
parent
441a877ce5
commit
d4e6122ba2
1 changed files with 8 additions and 0 deletions
|
|
@ -9,4 +9,12 @@ Sentry.init do |config|
|
|||
# config.traces_sampler = lambda do |context|
|
||||
# true
|
||||
# end
|
||||
|
||||
# During deployment we touch tmp/restart.txt, let's use its last access time as release.
|
||||
# Unless someone has set a variable of course...
|
||||
osem_version_from_file = nil
|
||||
version_file = File.expand_path('../../tmp/restart.txt', __dir__)
|
||||
osem_version_from_file = File.new(version_file).atime.to_i if File.file?(version_file)
|
||||
osem_version = ENV.fetch('OSEM_SENTRY_RELEASE', osem_version_from_file)
|
||||
config.release = osem_version if osem_version
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue