|
11 | 11 | </Target>
|
12 | 12 |
|
13 | 13 | <!-- Set PackageProjectUrl and PackageReleaseNotes to the package README.md and CHANGELOG.md respectively for DataPlane Libraries -->
|
14 |
| - <Target Name="SetPackageProjectUrlandReleaseNotes" BeforeTargets="GenerateNuspec" DependsOnTargets="InitializeSourceControlInformationFromSourceControlManager" Condition="'$(IsDataPlaneProject)' == 'true' and '$(IsTestProject)' != 'true' and |
15 |
| - '$(IsSamplesProject)' != 'true' and '$(IsTestSupportProject)' != 'true' and '$(SourceRevisionId)' != ''"> |
| 14 | + <Target Name="SetPackageProjectUrlandReleaseNotes" BeforeTargets="GenerateNuspec" DependsOnTargets="InitializeSourceControlInformationFromSourceControlManager" Condition="'$(IsShippingDataPlaneLibrary)' == 'true' and '$(SourceRevisionId)' != ''"> |
16 | 15 | <Error Condition="'$(IsClientLibrary)' == 'true' and '$(PackageReleaseNotes)' != ''" Text="Do NOT set PackageReleaseNotes property in the project. Release notes are added automatically from package changelog" />
|
17 | 16 | <PropertyGroup>
|
18 | 17 | <PackageRootPath>$([MSBuild]::NormalizeDirectory($(MSBuildProjectDirectory)/../))</PackageRootPath>
|
|
24 | 23 | </Target>
|
25 | 24 |
|
26 | 25 | <!--Extract release notes for the current version being built -->
|
27 |
| - <Target Name="GetCurrentReleaseNotes" BeforeTargets="SetPackageProjectUrlandReleaseNotes" Condition="'$(SkipDevBuildNumber)' == 'true' and '$(IsShippingClientLibrary)' == 'true'" > |
| 26 | + <Target Name="GetCurrentReleaseNotes" BeforeTargets="SetPackageProjectUrlandReleaseNotes" Condition="'$(SkipDevBuildNumber)' == 'true' and '$(IsShippingDataPlaneLibrary)' == 'true'" > |
28 | 27 | <PropertyGroup>
|
29 | 28 | <PowerShellExe Condition=" '$(PowerShellExe)'=='' ">"%ProgramFiles%\PowerShell\6\pwsh.exe"</PowerShellExe>
|
30 | 29 | <PowerShellExe Condition="!Exists('$(PowerShellExe)')">pwsh</PowerShellExe>
|
31 | 30 | <GetReleaseNotesScriptPath Condition=" '$(GetReleaseNotesScriptPath)'=='' ">$(MSBuildThisFileDirectory)/common/Extract-ReleaseNotes.ps1</GetReleaseNotesScriptPath>
|
32 | 31 | <ChangeLogPath>$([MSBuild]::NormalizeDirectory($(MSBuildProjectDirectory)/../))CHANGELOG.md</ChangeLogPath>
|
33 | 32 | </PropertyGroup>
|
34 |
| - <Exec ContinueOnError="true" ConsoleToMSBuild="true" Command="$(PowerShellExe) -NonInteractive -executionpolicy Unrestricted -File $(GetReleaseNotesScriptPath) $(ChangeLogPath) $(Version)"> |
| 33 | + <Exec Condition="Exists('$(ChangeLogPath)')" ContinueOnError="true" ConsoleToMSBuild="true" Command="$(PowerShellExe) -NonInteractive -executionpolicy Unrestricted -File $(GetReleaseNotesScriptPath) $(ChangeLogPath) $(Version)"> |
35 | 34 | <Output TaskParameter="ConsoleOutput" ItemName="ExtractedReleaseNotesTemp" />
|
36 | 35 | <Output TaskParameter="ExitCode" PropertyName="SetReleaseNotesErrorCode" />
|
37 | 36 | </Exec>
|
38 |
| - <Error Condition="'$(SetReleaseNotesErrorCode)' != '0'" Text="Release Notes for the specified version was not found. @(ExtractedReleaseNotesTemp)" /> |
39 |
| - <ItemGroup> |
| 37 | + <Error Condition="Exists('$(ChangeLogPath)') and '$(SetReleaseNotesErrorCode)' != '0'" Text="Release Notes for the specified version was not found. @(ExtractedReleaseNotesTemp)" /> |
| 38 | + <ItemGroup Condition="Exists('$(ChangeLogPath)')"> |
40 | 39 | <ExtractedReleaseNotes Condition="'$(SetReleaseNotesErrorCode)'=='0'" Include="@(ExtractedReleaseNotesTemp)" />
|
41 | 40 | </ItemGroup>
|
42 | 41 | </Target>
|
|
0 commit comments