Skip to content

Commit c7f027a

Browse files
committed
always create a release even if sourcemap upload is disabled
1 parent 2258711 commit c7f027a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

packages/rollup-plugin/src/index.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -204,22 +204,22 @@ export function _rollupPluginInternal(
204204
outputOptions: { dir?: string; file?: string },
205205
bundle: { [fileName: string]: unknown }
206206
): Promise<void> {
207-
if (!sourcemapsEnabled) {
208-
return;
209-
}
210-
211207
try {
212208
await sentryBuildPluginManager.createRelease();
213209

214-
if (outputOptions.dir) {
215-
const outputDir = outputOptions.dir;
216-
const buildArtifacts = await globFiles(outputDir);
217-
await upload(buildArtifacts);
218-
} else if (outputOptions.file) {
219-
await upload([outputOptions.file]);
220-
} else {
221-
const buildArtifacts = Object.keys(bundle).map((asset) => path.join(path.resolve(), asset));
222-
await upload(buildArtifacts);
210+
if (sourcemapsEnabled && options.sourcemaps?.disable !== "disable-upload") {
211+
if (outputOptions.dir) {
212+
const outputDir = outputOptions.dir;
213+
const buildArtifacts = await globFiles(outputDir);
214+
await upload(buildArtifacts);
215+
} else if (outputOptions.file) {
216+
await upload([outputOptions.file]);
217+
} else {
218+
const buildArtifacts = Object.keys(bundle).map((asset) =>
219+
path.join(path.resolve(), asset)
220+
);
221+
await upload(buildArtifacts);
222+
}
223223
}
224224
} finally {
225225
freeGlobalDependencyOnBuildArtifacts();

0 commit comments

Comments
 (0)