Skip to content

Commit

Permalink
use sentry release name from SENTRY_RELEASE env var
Browse files Browse the repository at this point in the history
  • Loading branch information
linobino1 committed Sep 1, 2024
1 parent c720f8d commit 6286625
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/fly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --config ./fly.toml --remote-only --build-arg SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} --build-arg BUILD_NUMBER=${{ github.run_number }}
- run: flyctl deploy --config ./fly.toml --remote-only --build-arg SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} --build-arg SENTRY_RELEASE=${{ github.run_number }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
SENTRY_RELEASE: ${{ github.run_number }}
BUILD_NUMBER: ${{ github.run_number }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ RUN pnpm install --prod false --frozen-lockfile
# we'll need the sentry auth token to upload sourcemaps during the build
ARG SENTRY_AUTH_TOKEN
ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
ARG RELEASE_NAME
ENV RELEASE_NAME=${RELEASE_NAME}
ARG SENTRY_RELEASE
ENV SENTRY_RELEASE=${SENTRY_RELEASE}

# we need those certificates to be able to connect to sentry
RUN apt-get update && apt-get install -y ca-certificates
Expand Down
2 changes: 0 additions & 2 deletions app/entry.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ Sentry.init({
}),
Sentry.replayIntegration(),
],

release: environment().BUILD_NUMBER,
});

async function hydrate() {
Expand Down
1 change: 0 additions & 1 deletion app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export function handleError(error: any, { request }: { request: Request }) {
Sentry.init({
dsn: process.env.SENTRY_DSN,
tracesSampleRate: 1,
release: process.env.BUILD_NUMBER,
});

const ABORT_DELAY = 5000;
Expand Down
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ declare global {
CDN_CGI_IMAGE_URL: string;
MAILCHIMP_SIGNUP_URL: string;
SENTRY_DSN: string;
SENTRY_RELEASE: string;
BUILD_NUMBER: string;
}
interface Window {
Expand Down
1 change: 0 additions & 1 deletion vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export default defineConfig({
org: "leo-hilsheimer",
project: "kino-im-blauen-salon",
authToken: process.env.SENTRY_AUTH_TOKEN,
release: process.env.BUILD_NUMBER,
}),
],
ssr: {
Expand Down

0 comments on commit 6286625

Please sign in to comment.