Skip to content

Commit

Permalink
Fabo/set version for sentry (#3449)
Browse files Browse the repository at this point in the history
* set sentry version

* changelog

* lack of stringification was breaking builds

Co-authored-by: Jordan Bibla <[email protected]>
  • Loading branch information
faboweb and jbibla committed Jan 21, 2020
1 parent c09208d commit 455ec95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions changes/fabo_set-version-for-sentry
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Repository] Set Lunie version for Sentry @faboweb
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import "material-design-icons-iconfont/dist/material-design-icons.css"
if (config.sentryDSN) {
Sentry.init({
dsn: config.sentryDSN,
integrations: [new Integrations.Vue({ Vue, attachProps: true })]
integrations: [new Integrations.Vue({ Vue, attachProps: true })],
release: process.env.LUNIE_VERSION
})
}

Expand Down
8 changes: 2 additions & 6 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
const path = require(`path`)
const webpack = require(`webpack`)
const CSPWebpackPlugin = require(`csp-webpack-plugin`)
const { version } = require("./package.json")

function resolve(dir) {
return path.join(__dirname, dir)
}

const commitHash = require(`child_process`)
.execSync(`git rev-parse HEAD`)
.toString()
.trim()

module.exports = {
publicPath: `/`,
chainWebpack: config => {
Expand Down Expand Up @@ -41,7 +37,7 @@ module.exports = {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
NETWORK: JSON.stringify(process.env.NETWORK),
SENTRY_DSN: JSON.stringify(process.env.SENTRY_DSN),
RELEASE: JSON.stringify(commitHash),
LUNIE_VERSION: JSON.stringify(version),
GOOGLE_ANALYTICS_UID: JSON.stringify(
process.env.GOOGLE_ANALYTICS_UID
),
Expand Down

0 comments on commit 455ec95

Please sign in to comment.