Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Add option to allow creating a release for local builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rbliss committed Jul 19, 2023
1 parent 9473732 commit bf7d0d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ For more information about the parameters below, please see the [Sentry release
| `skipSourceMaps` | - | If true, disable uploading source maps to Sentry. | `false` |
| `deployPreviews` | - | If false, skip running the build plugin on preview deploys. | `true` |
| `deleteSourceMaps` | SENTRY_DELETE_SOURCEMAPS | If true, delete source maps after uploading them to Sentry. May cause browser console errors if not used alongside your build tool's equivalent of webpack's [`hidden-source-map` option](https://webpack.js.org/configuration/devtool/). | `false` |
| `enableLocal` | SENTRY_LOCAL | If true, create a Sentry release for local builds. | `false` |

## `@sentry/netlify-build-plugin` vs. `@netlify/sentry`

Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ module.exports = {
const sourceMapPath = inputs.sourceMapPath || PUBLISH_DIR;
const sourceMapUrlPrefix = inputs.sourceMapUrlPrefix || DEFAULT_SOURCE_MAP_URL_PREFIX;
const shouldDeleteMaps = process.env.SENTRY_DELETE_SOURCEMAPS || inputs.deleteSourceMaps;
const enableLocal = process.env.SENTRY_LOCAL || inputs.enableLocal;

if (RUNNING_IN_NETLIFY) {
if (RUNNING_IN_NETLIFY || enableLocal) {
if (IS_PREVIEW && !inputs.deployPreviews) {
console.log('Skipping Sentry release creation - Deploy Preview');
return;
Expand Down
3 changes: 3 additions & 0 deletions manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ inputs:
- name: deleteSourceMaps
description: If true, delete source maps after uploading them to Sentry.
default: False
- name: enableLocal
description: Create a Sentry release for local builds.
default: False

0 comments on commit bf7d0d8

Please sign in to comment.