Closed joaopgrassi closed 2 years ago
I'm investigating the issue. I suppose this release.js is a script for production only. Can I remove generate-release directly? any impact on production?
@bruno-garcia I notice that Kamil Ogórek is also from Sentry. Can you ping him internally to check what's going on? and why we need this release.js? looks ng build is enough.
Maybe we can put the "tmp/release.js" inside the production configuration on angular.json? As then only builds with --prod would require this? Not sure.
If that's possible, then it would be perfect.
I suppose this release.js is a script for production only. Can I remove generate-release directly? any impact on production?
generate-release
is used to create a git hash based release names for Sentry project, so that every release is grouped together. See: https://github.com/dotnet/nuget-trends/pull/175
Afaik there's no way to access git hash during angular build process, so I had to do it by hand. If there is, would be great to integrate it into it.
We basically need window.SENTRY_RELEASE = { id: <hash> }
to be injected into the build in one way or another. Sentry.init
from our JS SDK will then pick it up automatically.
I'll take care of this 😊. It should be possible to require the file only when running ng prod builds.
We require now the presence of
tmp/release.js
, but when running theng
commands likeng build
,ng test
orng serve
it fails with:It would be best if the
ng
commands would still work and not require this file during development.Maybe we can put the
"tmp/release.js"
inside theproduction
configuration onangular.json
? As then only builds with --prod would require this? Not sure.