Skip to content

Commit 0890cd0

Browse files
committed
Correct Sentry deployment.
Fix previx for process.env DSN variable.
1 parent 10625fb commit 0890cd0

File tree

12 files changed

+24
-23
lines changed

12 files changed

+24
-23
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ VUE_APP_LINK_TERMS_IN_ABOUT=false
1515
VUE_APP_GOOGLE_OAUTH_CLIENT_ID="681537921273-i0odfloiqlq0iv5dodckg0pgt643hers.apps.googleusercontent.com"
1616

1717
# Do not define the Sentry DSN for anything but production
18-
# VUE_SENTRY_DSN=""
18+
# VUE_APP_SENTRY_DSN=""

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "bravue",
3-
"version": "0.23.1",
3+
"version": "0.23.4",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",
7-
"build": "vue-cli-service build",
7+
"build": "vue-cli-service build --mode production",
88
"build_staging": "NODE_ENV=production vue-cli-service build --mode staging",
99
"make_tar": "scripts/make_dist_tar.sh $npm_package_version prod",
1010
"make_tar_staging": "scripts/make_dist_tar.sh $npm_package_version staging",

src/pages/about/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ import { api_url } from '@/ApiUrlResolution'
88
import * as Sentry from '@sentry/vue'
99

1010
const app = createApp(App)
11-
if("VUE_SENTRY_DSN" in process.env){
12-
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
11+
if(process.env.hasOwnProperty("VUE_APP_SENTRY_DSN") && process.env.VUE_APP_SENTRY_DSN.length > 0){
12+
Sentry.init({ app, dsn: process.env.VUE_APP_SENTRY_DSN, sendDefaultPii: false })
1313
}else{
1414
console.log("Sentry.io not enabled for non-production build")
1515
}
16+
1617
app.provide('api', api_url())
1718

1819
// Inject gtag header if config includes a non-blank google analyitics id

src/pages/gene/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { api_url } from '@/ApiUrlResolution'
1212
import * as Sentry from '@sentry/vue'
1313

1414
const app = createApp(App)
15-
if("VUE_SENTRY_DSN" in process.env){
16-
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
15+
if(process.env.hasOwnProperty("VUE_APP_SENTRY_DSN") && process.env.VUE_APP_SENTRY_DSN.length > 0){
16+
Sentry.init({ app, dsn: process.env.VUE_APP_SENTRY_DSN, sendDefaultPii: false })
1717
}else{
1818
console.log("Sentry.io not enabled for non-production build")
1919
}

src/pages/home/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { api_url } from '@/ApiUrlResolution'
88
import * as Sentry from '@sentry/vue'
99

1010
const app = createApp(App)
11-
if("VUE_SENTRY_DSN" in process.env){
12-
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
11+
if(process.env.hasOwnProperty("VUE_APP_SENTRY_DSN") && process.env.VUE_APP_SENTRY_DSN.length > 0){
12+
Sentry.init({ app, dsn: process.env.VUE_APP_SENTRY_DSN, sendDefaultPii: false })
1313
}else{
1414
console.log("Sentry.io not enabled for non-production build")
1515
}

src/pages/login/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { api_url } from '@/ApiUrlResolution'
1212
import * as Sentry from '@sentry/vue'
1313

1414
const app = createApp(App)
15-
if("VUE_SENTRY_DSN" in process.env){
16-
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
15+
if(process.env.hasOwnProperty("VUE_APP_SENTRY_DSN") && process.env.VUE_APP_SENTRY_DSN.length > 0){
16+
Sentry.init({ app, dsn: process.env.VUE_APP_SENTRY_DSN, sendDefaultPii: false })
1717
}else{
1818
console.log("Sentry.io not enabled for non-production build")
1919
}

src/pages/logout/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { api_url } from '@/ApiUrlResolution'
1212
import * as Sentry from '@sentry/vue'
1313

1414
const app = createApp(App)
15-
if("VUE_SENTRY_DSN" in process.env){
16-
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
15+
if(process.env.hasOwnProperty("VUE_APP_SENTRY_DSN") && process.env.VUE_APP_SENTRY_DSN.length > 0){
16+
Sentry.init({ app, dsn: process.env.VUE_APP_SENTRY_DSN, sendDefaultPii: false })
1717
}else{
1818
console.log("Sentry.io not enabled for non-production build")
1919
}

src/pages/privacy/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { api_url } from '@/ApiUrlResolution'
88
import * as Sentry from '@sentry/vue'
99

1010
const app = createApp(App)
11-
if("VUE_SENTRY_DSN" in process.env){
12-
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
11+
if(process.env.hasOwnProperty("VUE_APP_SENTRY_DSN") && process.env.VUE_APP_SENTRY_DSN.length > 0){
12+
Sentry.init({ app, dsn: process.env.VUE_APP_SENTRY_DSN, sendDefaultPii: false })
1313
}else{
1414
console.log("Sentry.io not enabled for non-production build")
1515
}

src/pages/region/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { api_url } from '@/ApiUrlResolution'
1212
import * as Sentry from '@sentry/vue'
1313

1414
const app = createApp(App)
15-
if("VUE_SENTRY_DSN" in process.env){
16-
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
15+
if(process.env.hasOwnProperty("VUE_APP_SENTRY_DSN") && process.env.VUE_APP_SENTRY_DSN.length > 0){
16+
Sentry.init({ app, dsn: process.env.VUE_APP_SENTRY_DSN, sendDefaultPii: false })
1717
}else{
1818
console.log("Sentry.io not enabled for non-production build")
1919
}

src/pages/terms/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { api_url } from '@/ApiUrlResolution'
77
import * as Sentry from '@sentry/vue'
88

99
const app = createApp(App)
10-
if("VUE_SENTRY_DSN" in process.env){
11-
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
10+
if(process.env.hasOwnProperty("VUE_APP_SENTRY_DSN") && process.env.VUE_APP_SENTRY_DSN.length > 0){
11+
Sentry.init({ app, dsn: process.env.VUE_APP_SENTRY_DSN, sendDefaultPii: false })
1212
}else{
1313
console.log("Sentry.io not enabled for non-production build")
1414
}

0 commit comments

Comments
 (0)