| 277 | const upload = createDebugIdUploadFunction({ sentryBuildPluginManager }); |
| 278 | |
| 279 | const run = async (): Promise<void> => { |
| 280 | try { |
| 281 | await sentryBuildPluginManager.createRelease(); |
| 282 | if (sourcemapsEnabled && options.sourcemaps?.disable !== 'disable-upload') { |
| 283 | const outputPath = compilation.outputOptions.path ?? path.resolve(); |
| 284 | const buildArtifacts = Object.keys(compilation.assets).map(asset => path.join(outputPath, asset)); |
| 285 | await upload(buildArtifacts); |
| 286 | } |
| 287 | } finally { |
| 288 | freeGlobalDependencyOnBuildArtifacts(); |
| 289 | await sentryBuildPluginManager.deleteArtifacts(); |
| 290 | } |
| 291 | }; |
| 292 | |
| 293 | run().then( |
| 294 | () => callback(), |