Skip to content

fix(prepare)!: Fail when no target bumps the version, and bump nuget VersionPrefix - #923

Merged
BYK merged 2 commits into
masterfrom
fix/nuget-bump-version-prefix
Oct 22, 2026
Merged

BYK merged 2 commits into
masterfrom
fix/nuget-bump-version-prefix

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Two fixes for #825, where a sentry-dotnet release went out with the previous version on every .nupkg.

nuget VersionPrefix: the nuget auto-bumper already detects Directory.Build.props, but it only rewrote <Version>, <PackageVersion>, <AssemblyVersion> and <FileVersion>. SDK-style repos that set <VersionPrefix> instead (e.g. sentry-dotnet) matched nothing, so the bump reported "detection failed". It now rewrites <VersionPrefix> too, matching what sentry-dotnet's own bump-version.ps1 does.

Breaking: prepare fails when nothing gets bumped. When automatic version bumping is active and targets support bumping but none of them find a version to update, prepare used to log a warning and continue, committing and tagging with a stale version. It now throws a ConfigurationError. Repos whose versions don't live in project files (e.g. MinVer or tag-derived versions) need to set preReleaseCommand: '' to opt out. Configs where no target supports bumping (e.g. github-only) still just warn.

Fixes #825

via BYK.

--

View Junior Session [Sentry]

Fixes #825

Co-Authored-By: Burak Yigit Kaya <burak.kaya@sentry.io>
If every bumpable target skips detection, prepare used to warn and
continue, releasing artifacts with the previous version. Fail instead.

Refs #825

Co-Authored-By: Burak Yigit Kaya <burak.kaya@sentry.io>
@sentry-junior sentry-junior Bot changed the title fix(nuget): Bump VersionPrefix in project files fix(prepare)!: Fail when no target bumps the version, and bump nuget VersionPrefix Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-22 13:41 UTC

@BYK
BYK enabled auto-merge (squash) October 22, 2026 13:39
@BYK
BYK merged commit 6ae6587 into master Oct 22, 2026
23 checks passed
@BYK
BYK deleted the fix/nuget-bump-version-prefix branch October 22, 2026 13:41
jamescrosswell pushed a commit to getsentry/sentry-dotnet that referenced this pull request Oct 22, 2026
* ci: Use craft's built-in version bumping

Craft 3.0.0 bumps <VersionPrefix> in Directory.Build.props itself and
fails prepare if no version gets bumped (getsentry/craft#923), so the
custom bump-version script is no longer needed.

Co-Authored-By: Burak Yigit Kaya <burak.kaya@sentry.io>

* ci: Move to craft's changelog and versioning policy keys
Co-Authored-By: Burak Yigit Kaya <burak.kaya@sentry.io>

* ci: Use the craft v3 floating tag
Co-Authored-By: Burak Yigit Kaya <burak.kaya@sentry.io>

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Burak Yigit Kaya <burak.kaya@sentry.io>

This branch was successfully deployed

1 active deployment
false — f2732436 Deployed Oct 22, 2026 by sentry-junior[bot] via Build #3161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nuget target silently skips Directory.Build.props, proceeds with stale version

1 participant