From dc17be8ad1aa6e97f499bbf3f5bdeda67c2a1ec8 Mon Sep 17 00:00:00 2001 From: Kichiyaki Date: Wed, 10 Nov 2021 08:24:21 +0100 Subject: [PATCH] sentry: add a prefix to the release name --- .github/workflows/publish.yml | 2 +- Dockerfile | 2 +- next.config.js | 2 +- sentry.server.config.ts | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2d1a583..ef28e8c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,7 +45,7 @@ jobs: SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_DSN=${{ secrets.SENTRY_DSN }} - VERSION=v${{ steps.get_version.outputs.VERSION }} + VERSION=${{ steps.get_version.outputs.VERSION }} PLAUSIBLE_ENABLED=true PLAUSIBLE_DOMAIN=${{ secrets.PLAUSIBLE_DOMAIN }} PLAUSIBLE_CUSTOM_DOMAIN=${{ secrets.PLAUSIBLE_CUSTOM_DOMAIN }} diff --git a/Dockerfile b/Dockerfile index a3b2bb9..d916265 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,7 +45,7 @@ FROM node:14.18.1-alpine AS runner WORKDIR /app -ARG VERSION="v0.0.0" +ARG VERSION="0.0.0" ARG SENTRY_DSN="" ARG PLAUSIBLE_ENABLED="false" ARG PLAUSIBLE_DOMAIN="" diff --git a/next.config.js b/next.config.js index 59c8aa3..210d4d9 100644 --- a/next.config.js +++ b/next.config.js @@ -37,5 +37,5 @@ const cfg = { module.exports = withSentryConfig(cfg, { silent: true, - release: process.env.NEXT_PUBLIC_VERSION, + release: 'zdam-egzamin-zawodowy-website@' + process.env.NEXT_PUBLIC_VERSION, }); diff --git a/sentry.server.config.ts b/sentry.server.config.ts index fd017c9..4d46738 100644 --- a/sentry.server.config.ts +++ b/sentry.server.config.ts @@ -12,7 +12,9 @@ const initSentry = () => { dsn: SENTRY_DSN, tracesSampleRate: 0.3, environment: process.env.NODE_ENV ?? 'development', - release: process.env.NEXT_PUBLIC_VERSION, + release: + 'zdam-egzamin-zawodowy-website@' + + (process.env.NEXT_PUBLIC_VERSION ?? 'development'), }); };