Skip to content

Commit

Permalink
ref(gatsby): Default release to empty string
Browse files Browse the repository at this point in the history
To make gatsby work better out of the box, we set the default
for the release value to be undefined instead of an empty string.
  • Loading branch information
AbhiPrasad committed Jun 28, 2021
1 parent 8ea6c9d commit 14abbb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const sentryRelease = JSON.stringify(
process.env.ZEIT_GITHUB_COMMIT_SHA ||
process.env.ZEIT_GITLAB_COMMIT_SHA ||
process.env.ZEIT_BITBUCKET_COMMIT_SHA ||
'',
undefined,
);

const sentryDsn = JSON.stringify(process.env.SENTRY_DSN || '');
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/test/gatsby-node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('onCreateWebpackConfig', () => {
expect(plugins.define).toHaveBeenCalledTimes(1);
expect(plugins.define).toHaveBeenLastCalledWith({
__SENTRY_DSN__: expect.any(String),
__SENTRY_RELEASE__: expect.any(String),
__SENTRY_RELEASE__: undefined,
});

expect(actions.setWebpackConfig).toHaveBeenCalledTimes(1);
Expand Down

0 comments on commit 14abbb1

Please sign in to comment.