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

(feat) enable local builds #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = inputs.deleteSourceMaps || SENTRY_DELETE_SOURCEMAPS;
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