diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f8432a..42eaca6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,13 +23,16 @@ build: sentry: stage: ops image: getsentry/sentry-cli + variables: + VERSION: 4.0.0-${CI_COMMIT_SHA:0:8} only: - master dependencies: - build script: - - sentry-cli releases new -p geekbot 4.0.0-${CI_COMMIT_SHA:0:8} - - sentry-cli releases set-commits --auto 4.0.0-${CI_COMMIT_SHA:0:8} + - sentry-cli releases new -p geekbot $VERSION + - sentry-cli releases set-commits --auto $VERSION + - sentry-cli releases deploys $VERSION new -e Production deploy: stage: deploy diff --git a/Geekbot.net/Lib/ErrorHandling/ErrorHandler.cs b/Geekbot.net/Lib/ErrorHandling/ErrorHandler.cs index c6e1f8d..5323ee6 100644 --- a/Geekbot.net/Lib/ErrorHandling/ErrorHandler.cs +++ b/Geekbot.net/Lib/ErrorHandling/ErrorHandler.cs @@ -28,7 +28,7 @@ namespace Geekbot.net.Lib.ErrorHandling var sentryDsn = Environment.GetEnvironmentVariable("SENTRY"); if (!string.IsNullOrEmpty(sentryDsn)) { - _raven = new RavenClient(sentryDsn) { Release = Constants.BotVersion() }; + _raven = new RavenClient(sentryDsn) { Release = Constants.BotVersion(), Environment = "Production" }; _logger.Information(LogSource.Geekbot, $"Command Errors will be logged to Sentry: {sentryDsn}"); } else