-
Notifications
You must be signed in to change notification settings - Fork 720
Prevent preview packages to ship as RC #6195
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <!-- This needs to be set to true before importing parent Directory.Build.props --> | ||
| <!-- This library can't ship stable until Azure.Provisioning.WebPubSub ships stable. --> | ||
| <SuppressFinalPackageVersion>true</SuppressFinalPackageVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <!-- This needs to be set to true before importing parent Directory.Build.props --> | ||
| <SuppressFinalPackageVersion>true</SuppressFinalPackageVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <!-- This needs to be set to true before importing parent Directory.Build.props --> | ||
| <SuppressFinalPackageVersion>true</SuppressFinalPackageVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <!-- This needs to be set to true before importing parent Directory.Build.props --> | ||
| <!-- This library can't ship stable until Azure.AI.OpenAI ships stable. --> | ||
| <SuppressFinalPackageVersion>true</SuppressFinalPackageVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <!-- This needs to be set to true before importing parent Directory.Build.props --> | ||
| <SuppressFinalPackageVersion>true</SuppressFinalPackageVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <!-- This needs to be set to true before importing parent Directory.Build.props --> | ||
| <SuppressFinalPackageVersion>true</SuppressFinalPackageVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <!-- This needs to be set to true before importing parent Directory.Build.props --> | ||
| <SuppressFinalPackageVersion>true</SuppressFinalPackageVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <!-- This needs to be set to true before importing parent Directory.Build.props --> | ||
| <!-- This library can't ship stable until OpenAI ships stable. --> | ||
| <SuppressFinalPackageVersion>true</SuppressFinalPackageVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" /> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,12 @@ | |
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| <Target Name="ValidatePreReleaseLabelIsCorrectForPreviewPackages" | ||
| AfterTargets="Pack" | ||
| Condition="'$(OfficialBuildId)' != '' and '$(SuppressFinalPackageVersion)' == 'true' and !$(PreReleaseVersionLabel.StartsWith('preview'))"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be better to actually look at the outputted nupkg and verify its version?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would be possible I think, yes, via a Regex that extracts the label. Unless you feel strongly about it, I can make those changes in main along with your refactoring suggestion in favor of getting rc1 build ready. |
||
| <Error Text="The PreReleaseLabel for package '$(MSBuildProjectName)' must start with 'preview' as it has the SuppressFinalPackageVersion flag set. Current label is '$(PreReleaseVersionLabel)'" /> | ||
| </Target> | ||
|
|
||
| <!-- | ||
| Logic for generating and comparing the ConfigurationSchema.json file | ||
| --> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we instead do this in a
.targetsso we don't have to split properties out of the .csprojs?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately no, this needs to happen in a props file as it's values are read in the Common props from the SDK, so setting it later would be too late. I am adding a test like @radical suggested, so at least we'll know if this is broken in a project because they aren't using a d.b.props file.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have 2 properties here - named whatever.
And then in the Directory.Build.targets set the
PreReleaseVersionLabelto one of those properties based onSuppressFinalPackageVersion.This is better ordering in MSBuild IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how arcade consumes this property - in a .targets.
https://github.com/dotnet/arcade/blob/382c993e9ab742d2292c9330e1b952c5b57aaa2c/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.BeforeCommonTargets.targets#L131-L137
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is technically possible, but I would be worried about the potential impact of those changes, especially when making these in a release branch as we don't know what changing the ordering of those properties could do. What would you say about doing this less risky change here, and then in main (which will have more bake time and validation) do the change you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is true. Doing a
dotnet build /bland looking at the preprocess, the only places I see that use this property are the .csproj setting it, and the arcade line above.If you are really concerned about the risk, we can clutter the 8 projects here like we are doing. But I don't think this is ideal. If you want to do it the correct way in main, I'm fine with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, at this point my top priority is to de-risk RC1, so unless you feel strongly about it, I'd opt for keeping this as-is and then getting this refactored in main