Repository navigation
Keep a consumer's package metadata and ContinuousIntegrationBuild [patch] - #98
Open
matt-edmondson wants to merge 1 commit into
Open
matt-edmondson wants to merge 1 commit into
matt-edmondson wants to merge 1 commit into
Conversation
…tch] Sdk.props assigned PackageDescription, PackageTags and PackageProjectUrl unconditionally, after the consumer's Directory.Build.props, so without DESCRIPTION.md, TAGS.md or PROJECT.url the consumer's values were replaced by empty ones or NuGet's placeholder. ContinuousIntegrationBuild was forced to false off GitHub Actions and Azure Pipelines. Assign each only from a value, and default ContinuousIntegrationBuild only when it is empty. Fixes #91 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW5RdbhA7TAMDQD8QTG
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #91
What was wrong
Sdk.propsis evaluated after the consumer'sDirectory.Build.props, and it assigned these properties unconditionally:PackageDescription=$(Description)PackageTags=$(Tags)PackageProjectUrl=$(ProjectUrl)ContinuousIntegrationBuild=false, flipped totrueonly on GitHub Actions or Azure PipelinesWith no
DESCRIPTION.md,TAGS.mdorPROJECT.url, a consumer's own values were replaced by empty ones, or by NuGet's "Package Description" placeholder. On GitLab, Jenkins or TeamCity, an explicitContinuousIntegrationBuild=truewas discarded.Change (
Sdk/Sdk.props)PackageDescription,PackageTagsandPackageProjectUrlare assigned only when their source (Description,Tags,ProjectUrl) has a value. Where the metadata files exist, they still set these properties, as before.ContinuousIntegrationBuildis only a default. It istrueon GitHub Actions or Azure Pipelines andfalseelsewhere, and only when the consumer left it empty.This covers the scalar-metadata part of the "Sdk.props overwrites consumer values" family named in the triage. #71 and #72 remain separate.
Tests
New
ConsumerMetadataOverrideTests(4 tests):Directory.Build.propssurvive without metadata filesfalseis kept on GitHub ActionsWith the
Sdk.propschange reverted, the two override tests fail:Expected:<https://example.com/foo>. Actual:<>andExpected:<false>. Actual:<true>. The other two cover behaviour that must not change, so they pass either way.Full
Sdk.Examples.Testssuite on this branch (Linux): 110 passed, 0 failed.Generated by Claude Code