Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ See the Nerdbank.GitVersioning removal entry under _Changes to existing features
- **BREAKING CHANGE**: `bv` no longer forces `-maxcpucount:1` on the `dotnet` invocations of `restore`/`build`/`test`/`pack`. MSBuild now uses its default parallelism unless you forward your own `-m`/`-maxcpucount` switch.
- **BREAKING CHANGE**: The `-c`/`--configuration` option is no longer parsed by `bv restore`/`build`/`test`/`pack`; for those commands it is just another forwarded argument, passed after the `--` separator. `bv` emits the configured default build configuration (`dotnet.configuration` in `buildvana.json`, or `Release`) as an overridable default, so a forwarded `-c`/`-p:Configuration=` still wins (e.g. `bv build -- -c Debug` builds `Debug`). `bv release` keeps `-c`/`--configuration` as a parsed option, since it needs the value to locate build artifacts.
- **BREAKING CHANGE**: The `--main-branch` global option has been removed, along with `bv`'s main-branch discovery. Documentation generation on release is now gated by `release.generateDocsFrom` in `buildvana.json`: a list of regular expressions matched against the current short branch name (default `["^main$", "^master$"]`, reproducing the previous main/master discovery). The human-curated changelog permalink in generated release notes now points at the release branch itself rather than the discovered main branch.
- **BREAKING CHANGE**: The `--unstable-changelog` and `--require-changelog` options of `bv release` have been removed with no CLI replacement; changelog policy is repository-stable, not per-invocation. Configure it in `buildvana.json` instead: `release.changelogUpdates` (`none` | `stable` | `all`, default `stable`) selects which releases update the changelog, and `release.emptyChangelog` provides substitute text for an empty "Unreleased changes" section (when unset, an empty section fails the release, matching the previous `--require-changelog` default of `true`).
- **BREAKING CHANGE**: The `--unstable-changelog` and `--require-changelog` options of `bv release` have been removed with no CLI replacement; changelog policy is repository-stable, not per-invocation. Configure it in `buildvana.json` instead: `release.changelogUpdates` (`none` | `stable` | `all`, default `stable`) selects which releases update the changelog, and `release.emptyChangelog` provides substitute text for an empty "Unreleased changes" section (when unset or blank, an empty section fails the release, matching the previous `--require-changelog` default of `true`).
- `bv`'s build commands (`clean`, `restore`, `build`, `test`, `pack`) and `release` now observe cancellation. Pressing Ctrl-C (or a host cancelling the operation) stops the pipeline promptly: it stops launching further steps and terminates the running `dotnet` child process instead of waiting for it to finish, then `bv` exits with code 130. Partial build output may be left behind on cancellation; `bv clean` recovers.
- **BREAKING CHANGE**: Nerdbank.GitVersioning has been removed from Buildvana SDK and `bv`. Versions are now computed natively from a `VERSION` file and `buildvana.json` keys (see _New features_ above): the `NerdbankGitVersioning` SDK module is gone, the `Nerdbank.GitVersioning` package is no longer injected into projects, `version.json` is no longer read, and `bv` no longer invokes the `nbgv` CLI. The `GetBuildVersion` target name is retained (as a real target or a stub) for targets that depend on it. To migrate a repository:
- create a `VERSION` file at the repository root holding the `version` value from `version.json` (e.g. `2.0-preview`). **The Git height restarts at the commit that creates `VERSION`**: it counts commits since `MAJOR.MINOR` last changed in that file, and a file that did not exist before counts as a change, so the history of the `version.json` it replaces does not carry over. If your latest published patch number is high, bump `MAJOR.MINOR` in the same commit: on a fresh version line the restart is harmless, whereas keeping the old line computes versions lower than the ones you already published;
Expand All @@ -103,7 +103,8 @@ See the Nerdbank.GitVersioning removal entry under _Changes to existing features
- `bv release` no longer tags and publishes a version one patch above the one its artifacts were built with. The "Prepare release" commit bumps the Git height, hence the version, but it was only created when an earlier step had a file to commit; a release with nothing to commit before the build (typically a prerelease with no version-spec change and `release.changelogUpdates` set to `stable` or `none`) therefore built and pushed its packages at the pre-commit version, then created the commit, and tagged and released the version above. The release commit is now always created before the build.
- URLs that `bv release` builds from the repository URL are no longer missing the separator before their first path segment: release links (`.../Buildvanareleases/tag/1.1.10`) and file links (`.../Buildvanablob/main/CHANGELOG.md`) now come out as `.../Buildvana/releases/tag/1.1.10` and `.../Buildvana/blob/main/CHANGELOG.md`. This affected the version section titles written into the changelog and the "human-curated changelog" link at the top of every generated release description; the titles already written for 1.0.220, 1.1.4, and 1.1.10 have been corrected in place.
- `bv clean` no longer silently ignores unknown options: `bv clean --bogus` now fails with `Unknown option '--bogus' for command 'clean'`. Every `bv` command now rejects options it does not recognize, and does so before anything else runs: previously, commands that parse their own options (e.g. `bv release`) reported an unknown option only after the SDK version check, so a mismatched SDK pin could mask the typo.
- A denied or failed file or directory access during a `bv` command (e.g. a locked or read-only `CHANGELOG.md`, `Directory.Packages.props`, or public API file, or a `bin` directory locked by Visual Studio during `bv clean`) no longer surfaces as an unhandled-exception stack trace pointing at `bv` internals. File and directory accesses now report failure as a single clean error line naming the operation, the path, and the operating-system reason (`Could not read from <path>: <reason>`), and `bv` exits with its regular failure exit code.
- A denied or failed file or directory access during a `bv` command (e.g. a locked or read-only `CHANGELOG.md`, `Directory.Packages.props`, or public API file, or a `bin` directory locked by Visual Studio during `bv clean`) no longer surfaces as an unhandled-exception stack trace pointing at `bv` internals. File and directory accesses now report failure as a single clean error line naming the operation, the path, and the operating-system reason (`Could not read from <path>: <reason>`), and `bv` exits with its regular failure exit code. This covers failures that happen part-way through reading a file, not just failures to open it: `bv release` reads the whole of `CHANGELOG.md` before rewriting it, so a file yanked mid-read (say, by a cloud-sync provider) is reported the same clean way.
- The release date in the changelog section titles written by `bv release` is now always formatted with the Gregorian calendar and the invariant date format. On a machine whose culture prescribes a different calendar (e.g. `th-TH`, `ar-SA`), the date written into `CHANGELOG.md` was the current culture's rendering of the day (`2569-04-27` rather than `2026-04-27`), and neither matched the release tag nor sorted with the other section titles.

### Known problems introduced by this release

Expand Down
2 changes: 1 addition & 1 deletion schemas/buildvana.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
]
},
"emptyChangelog": {
"description": "Text substituted when a release has no changelog entries. When omitted, an empty changelog fails the release.",
"description": "Text substituted when a release has no changelog entries. When omitted or blank, an empty changelog fails the release.",
"type": "string"
},
"dogfood": {
Expand Down
10 changes: 7 additions & 3 deletions src/Buildvana.Runtime/ReleaseConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ namespace Buildvana.Runtime;
public sealed record ReleaseConfig
{
/// <summary>Gets the regular expressions identifying branches that produce public releases.</summary>
[Description("Regular expressions (implicitly anchored, matched against the whole short branch name) identifying branches that produce public releases.")]
[Description(
"Regular expressions (implicitly anchored, matched against the whole short branch name) "
+ "identifying branches that produce public releases.")]
public IReadOnlyList<string>? Branches { get; init; }

/// <summary>Gets the regular expressions identifying branches that documentation is generated from.</summary>
[Description("Regular expressions (implicitly anchored, matched against the whole short branch name) identifying branches that documentation is generated from.")]
[Description(
"Regular expressions (implicitly anchored, matched against the whole short branch name) "
+ "identifying branches that documentation is generated from.")]
public IReadOnlyList<string>? GenerateDocsFrom { get; init; }

/// <summary>Gets the build configuration used to produce release artifacts.</summary>
Expand All @@ -34,7 +38,7 @@ public sealed record ReleaseConfig
public ChangelogUpdates? ChangelogUpdates { get; init; }

/// <summary>Gets the text substituted when a release has no changelog entries.</summary>
[Description("Text substituted when a release has no changelog entries. When omitted, an empty changelog fails the release.")]
[Description("Text substituted when a release has no changelog entries. When omitted or blank, an empty changelog fails the release.")]
public string? EmptyChangelog { get; init; }

/// <summary>Gets a value indicating whether self-references are updated (dogfooding) during a release.</summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Buildvana.Sdk.Tasks/Tasks/ComputeVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public sealed partial class ComputeVersion : BuildvanaSdkTask

protected override Undefined Run()
{
BuildFailedException.ThrowIfNot(
!string.IsNullOrEmpty(HomeDirectory),
BuildFailedException.ThrowIf(
string.IsNullOrEmpty(HomeDirectory),
string.Format(CultureInfo.InvariantCulture, Strings.MissingParameterFmt, nameof(HomeDirectory)));

var version = GetOrComputeVersion(HomeDirectory, Reporter);
Expand Down
8 changes: 4 additions & 4 deletions src/Buildvana.Sdk.Tasks/Tasks/ConvertPfxToSnk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public sealed class ConvertPfxToSnk : BuildvanaSdkTask

protected override Undefined Run()
{
BuildFailedException.ThrowIfNot(
!string.IsNullOrEmpty(PfxPath),
BuildFailedException.ThrowIf(
string.IsNullOrEmpty(PfxPath),
string.Format(CultureInfo.InvariantCulture, Strings.MissingParameterFmt, nameof(PfxPath)));
BuildFailedException.ThrowIfNot(
!string.IsNullOrEmpty(OutputPath),
BuildFailedException.ThrowIf(
string.IsNullOrEmpty(OutputPath),
string.Format(CultureInfo.InvariantCulture, Strings.MissingParameterFmt, nameof(OutputPath)));

using var cert = LoadCertificate(PfxPath, PfxPassword);
Expand Down
4 changes: 2 additions & 2 deletions src/Buildvana.Sdk.Tasks/Tasks/GetWinePath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public sealed class GetWinePath : BuildvanaSdkTask

protected override Undefined Run()
{
BuildFailedException.ThrowIfNot(
!string.IsNullOrEmpty(HostPath),
BuildFailedException.ThrowIf(
string.IsNullOrEmpty(HostPath),
string.Format(CultureInfo.InvariantCulture, Strings.MissingParameterFmt, nameof(HostPath)));

WinePath = WinePathUtility.ConvertToWinePath(HostPath, BasePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public sealed class WriteThisAssemblyConstantsFile : BuildvanaSdkTask

protected override Undefined Run()
{
BuildFailedException.ThrowIfNot(
!string.IsNullOrEmpty(OutputPath),
BuildFailedException.ThrowIf(
string.IsNullOrEmpty(OutputPath),
string.Format(CultureInfo.InvariantCulture, Strings.MissingParameterFmt, nameof(OutputPath)));

var sb = new StringBuilder();
Expand Down
Loading