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

Commit bf7d0d8

Browse files
committed
Add option to allow creating a release for local builds
1 parent 9473732 commit bf7d0d8

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ For more information about the parameters below, please see the [Sentry release
123123
| `skipSourceMaps` | - | If true, disable uploading source maps to Sentry. | `false` |
124124
| `deployPreviews` | - | If false, skip running the build plugin on preview deploys. | `true` |
125125
| `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` |
126+
| `enableLocal` | SENTRY_LOCAL | If true, create a Sentry release for local builds. | `false` |
126127

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

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ module.exports = {
3939
const sourceMapPath = inputs.sourceMapPath || PUBLISH_DIR;
4040
const sourceMapUrlPrefix = inputs.sourceMapUrlPrefix || DEFAULT_SOURCE_MAP_URL_PREFIX;
4141
const shouldDeleteMaps = process.env.SENTRY_DELETE_SOURCEMAPS || inputs.deleteSourceMaps;
42+
const enableLocal = process.env.SENTRY_LOCAL || inputs.enableLocal;
4243

43-
if (RUNNING_IN_NETLIFY) {
44+
if (RUNNING_IN_NETLIFY || enableLocal) {
4445
if (IS_PREVIEW && !inputs.deployPreviews) {
4546
console.log('Skipping Sentry release creation - Deploy Preview');
4647
return;

manifest.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ inputs:
2828
- name: deleteSourceMaps
2929
description: If true, delete source maps after uploading them to Sentry.
3030
default: False
31+
- name: enableLocal
32+
description: Create a Sentry release for local builds.
33+
default: False

0 commit comments

Comments
 (0)