Skip to content

Commit

Permalink
Fix rebase/squash Sentry errors
Browse files Browse the repository at this point in the history
  • Loading branch information
codykaup committed Oct 30, 2024
1 parent d198099 commit 6ba38ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ async function build() {
await $({ stdout: 'inherit', stderr: 'inherit' })`sentry-cli releases new ${nextVersion}`;

console.info('🔗 Associating commits with release');
// Pass --ignore-missing when we're not merging into `main` branch. This allows Sentry to
// gracefully handle rebasing/squashing.
const additionalFlags = process.env.GITHUB_REF === 'refs/heads/main' ? '' : '--ignore-missing';
await $({
stdout: 'inherit',
stderr: 'inherit',
})`sentry-cli releases set-commits --auto ${nextVersion}`;
})`sentry-cli releases set-commits --auto ${nextVersion} ${additionalFlags}`;

console.info('🧹 Removing sourcemaps from build');
await $`yarn clean:sourcemaps`;
Expand Down

0 comments on commit 6ba38ad

Please sign in to comment.