From 7c44d1c5a786b750c26e85a2fc433277c408ec45 Mon Sep 17 00:00:00 2001 From: PenPow Date: Sat, 29 Jul 2023 14:45:48 +0100 Subject: [PATCH] fix(env): fix invalid env variables --- build.ps1 | 2 +- build.sh | 2 +- src/index.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.ps1 b/build.ps1 index ce692816..dfbc8506 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,6 +1,6 @@ $Commit = git rev-parse HEAD -docker compose build --build-arg GIT_COMMIT="$Commit" --build-arg ENVIRONMENT="DEVELOPMENT" +docker compose build --build-arg GIT_COMMIT="$Commit" --build-arg ENVIRONMENT="development" if(!$?) { Exit $LASTEXITCODE } diff --git a/build.sh b/build.sh index f5263ff7..4b720577 100644 --- a/build.sh +++ b/build.sh @@ -1,3 +1,3 @@ -docker compose build --build-arg GIT_COMMIT=$(git rev-parse HEAD) --build-arg ENVIRONMENT="DEVELOPMENT" +docker compose build --build-arg GIT_COMMIT=$(git rev-parse HEAD) --build-arg ENVIRONMENT="development" docker compose up --force-recreate \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 21ca528b..83514b95 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,8 +10,8 @@ export const client = new SentryClient({ Sentry.init({ dsn: client.environment.SENTRY_DSN, release: client.environment.GIT_COMMIT, - enabled: client.environment.NODE_ENV === "PRODUCTION", - environment: client.environment.NODE_ENV.toLowerCase(), + enabled: client.environment.NODE_ENV === "production", + environment: client.environment.NODE_ENV, integrations: [ new Sentry.Integrations.Undici(), new RewriteFrames({ root: "/usr/sentry/dist", prefix: "src/" }), @@ -19,7 +19,7 @@ Sentry.init({ }); Sentry.setTags({ - version: client.environment.NODE_ENV, + version: client.environment.GIT_COMMIT, started_at: new Date(Date.now()).toUTCString(), node_version: client.environment.NODE_VERSION });