Skip to content

Resolve release changelog paths against the workspace [patch] - #232

Open
matt-edmondson wants to merge 3 commits into
mainfrom
claude/ktsubuild-172-workspace-changelog
Open

matt-edmondson wants to merge 3 commits into
mainfrom
claude/ktsubuild-172-workspace-changelog

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #172

What changed

ReleaseService passed LatestChangelogFile and ChangelogFile straight through to DotNetService.PackAsync and ReleaseOptions. They are bare file names by default, so File.Exists and Path.GetFullPath resolved them against the process's current directory instead of the workspace the metadata step wrote them to. A run with --workspace pointing elsewhere then shipped packages and the GitHub release with no notes, or with the changelog of whatever directory it was started from.

Both names are now resolved against the workspace (ResolveInWorkspace) before packing and before building ReleaseOptions. Rooted paths and empty values pass through unchanged.

I fixed this in ReleaseService rather than storing absolute paths in BuildConfigurationProvider, because MetadataService stages config.LatestChangelogFile with git add as a workspace-relative name. Changing the stored value would have changed that path too.

Tests

  • ExecuteReleaseAsync_ResolvesChangelogsAgainstTheWorkspace_NotTheCurrentDirectory changes the current directory to another directory that has its own LATEST_CHANGELOG.md. It then checks that the pack gets <workspace>/LATEST_CHANGELOG.md and that the release options carry both workspace paths. This test fails when the fix is reverted.
  • ExecuteReleaseAsync_KeepsRootedChangelogPathsAsGiven checks that a rooted path passes through unchanged.
  • The full suite passes locally: 785 passed, 0 failed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01J9ABDLXQgwyGEboxA8DpmQ


Generated by Claude Code

claude added 3 commits October 8, 2026 12:26
The changelog names are bare file names by default, and the release step
used them as-is, so they resolved against the process's current directory.
With --workspace pointing elsewhere, packages and the GitHub release shipped
with no notes, or with the current directory's changelog. Resolve both names
against the workspace before packing and before building the release options.

Fixes #172

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J9ABDLXQgwyGEboxA8DpmQ
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

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.

With --workspace set to another directory, packages and GitHub releases ship with no release notes, or with the changelog from the current directory

2 participants