Skip to content

Commit

Permalink
Merge pull request #231 from oskarrough/fix-build
Browse files Browse the repository at this point in the history
Fix sentry init
  • Loading branch information
oskarrough authored Jan 22, 2024
2 parents 9509924 + 0f0cb49 commit ea70476
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PUBLIC_VERSION=${npm_package_version}

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ dev-dist/
docs/
.vercel
.astro/
.env
.env.local
8 changes: 5 additions & 3 deletions src/ui/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ const {title} = Astro.props
crossorigin
/>
<script>
const version = import.meta.env.PUBLIC_VERSION
const environment = import.meta.env.PROD ? 'production' : 'development'
const pkgVersion = import.meta.env.PUBLIC_VERSION
console.log({environment, pkgVersion})
window.sentryOnLoad = function() {
Sentry.init({
environment: import.meta.env.PROD ? 'production' : 'development'
release: "slaytheweb@" + version
environment,
release: "slaytheweb@" + pkgVersion
})
}
</script>
Expand Down

1 comment on commit ea70476

@vercel
Copy link

@vercel vercel bot commented on ea70476 Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

slaytheweb – ./

slaytheweb.vercel.app
slaytheweb-git-main-oskar.vercel.app
slaytheweb-oskar.vercel.app
slaytheweb.cards

Please sign in to comment.