Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to Changelog link in Nuget rather than Release Notes #11675

Merged
merged 2 commits into from
May 4, 2020

Conversation

chidozieononiwu
Copy link
Member

Reverting to using link to CHANGELOG.md in Nuget rather that extracted releaseNotes.

<Output TaskParameter="ConsoleOutput" ItemName="ExtractedReleaseNotesTemp" />
<Output TaskParameter="ExitCode" PropertyName="SetReleaseNotesErrorCode" />
</Exec>
<Error Condition="Exists('$(ChangeLogPath)') and '$(SetReleaseNotesErrorCode)' != '0'" Text="No entry for version [$(_VersionInProject)] found in the ChangeLog [$(ChangeLogPath)]. @(ExtractedReleaseNotesTemp)" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we aren't extracting the notes anymore it seems like we should still validate that there is an entry for the version still. Perhaps we can turn this into a validate release notes exists target?

<PackageProjectUrl Condition="Exists('$(PackageRootPath)/README.md') and '$(SkipDevBuildNumber)' != 'true'">$([System.UriBuilder]::new($(RepositoryUrl)/blob/$(SourceRevisionId)/$(DirectoryPartofPath)README.md).Uri)</PackageProjectUrl>
<PackageProjectUrl Condition="Exists('$(PackageRootPath)/README.md') and '$(SkipDevBuildNumber)' != 'true'">$([System.UriBuilder]::new($(RepositoryUrl)/blob/$(MSBuildProjectName)_$(Version)/$(DirectoryPartofPath)README.md).Uri)</PackageProjectUrl>
<PackageReleaseNotes Condition="Exists('$(PackageRootPath)/CHANGELOG.md') and '$(SkipDevBuildNumber)' == 'true'">$([System.UriBuilder]::new($(RepositoryUrl)/blob/$(SourceRevisionId)/$(DirectoryPartofPath)CHANGELOG.md).Uri)</PackageReleaseNotes>
<PackageReleaseNotes Condition="Exists('$(PackageRootPath)/CHANGELOG.md') and '$(SkipDevBuildNumber)' == 'true'">$([System.UriBuilder]::new($(RepositoryUrl)/blob/$(MSBuildProjectName)_$(Version)/$(DirectoryPartofPath)CHANGELOG.md).Uri)</PackageReleaseNotes>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be MSBuildProjectName or PackageName?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are they not the same thing for Packages in this Repo? I don't see PackageName set as a property anywhere in the build.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they generally are, I thought cogservices wasn't but it turns out they are. It turns out nuget ends up using PackageId (https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets#L27) which defaults to AssemblyName which defaults to MSBuildProjectName. So I suggest using PackageId, assuming it is set before our target, just incase one of our projects end up with a custom name for some reason.

@chidozieononiwu chidozieononiwu force-pushed the RevertToChangeLogLink branch 2 times, most recently from 644ee23 to abdc61b Compare May 4, 2020 20:48
@chidozieononiwu chidozieononiwu self-assigned this May 4, 2020
@chidozieononiwu chidozieononiwu force-pushed the RevertToChangeLogLink branch from abdc61b to fc3f37f Compare May 4, 2020 21:32
@chidozieononiwu chidozieononiwu force-pushed the RevertToChangeLogLink branch from fc3f37f to 3bcc158 Compare May 4, 2020 21:35
@chidozieononiwu chidozieononiwu merged commit abc2c8a into Azure:master May 4, 2020
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.

2 participants