|
68 | 68 | Condition=" '$(Scope)' == 'AzureStorage' "/>
|
69 | 69 | <CmdletSolutionsToBuild Include=".\src\Stack.sln"
|
70 | 70 | Condition=" '$(Stack)' == 'true' "/>
|
71 |
| - |
| 71 | + |
72 | 72 | <StaticAnalysis Include=".\tools\StaticAnalysis\StaticAnalysis.sln" />
|
73 | 73 | <LocalBuildTasks Include="$(LibraryToolsFolder)\BuildPackagesTask\Microsoft.Azure.Build.Tasks.sln" />
|
74 | 74 | <LocalBuildTasks Include="$(LibraryToolsFolder)\RepoTasks\RepoTasks.sln" Condition="'$(NetCore)' == 'false'"/>
|
|
204 | 204 | </FilesChangedTask>
|
205 | 205 |
|
206 | 206 | <!-- Get the list of modules changed -->
|
207 |
| - <FilterTask FilesChanged="@(FilesChanged)" MapFilePath=".\ModuleMappings.json"> |
208 |
| - <Output TaskParameter="Output" ItemName="ModulesChanged"/> |
209 |
| - </FilterTask> |
210 |
| - <Message Text="Filtering help generation and StaticAnalysis by the following modules:"/> |
211 |
| - <Message Text="%(ModulesChanged.Identity)"/> |
212 |
| - <Message Text="Total: @(ModulesChanged->Count())"/> |
213 |
| - <Message Text=""/> |
214 |
| - |
215 |
| - <!--Get the list of tests to be run based on files changed from a specified PullRequestNumber. Mapping between paths and test DLLs is used to produce the list.--> |
216 |
| - <FilterTask FilesChanged="@(FilesChanged)" MapFilePath=".\TestMappings.json"> |
217 |
| - <Output TaskParameter="Output" ItemName="XUnitTests"/> |
218 |
| - </FilterTask> |
219 |
| - <Message Text="Using these test assemblies:"/> |
220 |
| - <Message Text="%(XUnitTests.Identity)"/> |
221 |
| - <Message Text="Total: @(XunitTests->Count())"/> |
222 |
| - <Message Text=""/> |
| 207 | + <FilterTask FilesChanged="@(FilesChanged)" MapFilePath=".\ModuleMappings.json"> |
| 208 | + <Output TaskParameter="Output" ItemName="ModulesChanged"/> |
| 209 | + </FilterTask> |
| 210 | + <Message Text="Filtering help generation and StaticAnalysis by the following modules:"/> |
| 211 | + <Message Text="%(ModulesChanged.Identity)"/> |
| 212 | + <Message Text="Total: @(ModulesChanged->Count())"/> |
| 213 | + <Message Text=""/> |
| 214 | + |
| 215 | + <!--Get the list of tests to be run based on files changed from a specified PullRequestNumber. Mapping between paths and test DLLs is used to produce the list.--> |
| 216 | + <FilterTask FilesChanged="@(FilesChanged)" MapFilePath=".\TestMappings.json"> |
| 217 | + <Output TaskParameter="Output" ItemName="XUnitTests"/> |
| 218 | + </FilterTask> |
| 219 | + <Message Text="Using these test assemblies:"/> |
| 220 | + <Message Text="%(XUnitTests.Identity)"/> |
| 221 | + <Message Text="Total: @(XunitTests->Count())"/> |
| 222 | + <Message Text=""/> |
223 | 223 | </Target>
|
224 | 224 |
|
225 | 225 | <!-- Build all flavors of the Cmdlets -->
|
226 | 226 | <Target Name="Build" DependsOnTargets="RestoreNugetPackages;BuildMsBuildTask;FilterBuild">
|
| 227 | + <CallTarget targets="ChangeLogCheck" ContinueOnError="false" /> |
| 228 | + |
227 | 229 | <Message Importance="high" Text="Building Cmdlets..." />
|
228 | 230 |
|
229 | 231 | <MakeDir Directories="$(PackageDirectory)" />
|
|
506 | 508 | <Error Text="StaticAnalysis has failed. Please follow the instructions on this doc: https://github.com/Azure/azure-powershell/blob/preview/documentation/Debugging-StaticAnalysis-Errors.md"/>
|
507 | 509 | </Target>
|
508 | 510 |
|
| 511 | + <Target Name="ChangeLogCheck"> |
| 512 | + <Exec Command=""$(PowerShellCommand)" -NonInteractive -NoLogo -NoProfile -Command ". $(LibraryToolsFolder)\CheckChangeLog.ps1 -FilesChanged '@(FilesChanged)' "" |
| 513 | + ContinueOnError="false" |
| 514 | + Condition="'$(Latest)' == 'true'"/> |
| 515 | + <OnError ExecuteTargets="ChangeLogErrorMessage"/> |
| 516 | + </Target> |
| 517 | + |
| 518 | + <Target Name="ChangeLogErrorMessage"> |
| 519 | + <Error Text="Modified files were found with no update to their change log. Please add a snippet to the affected modules' change log."/> |
| 520 | + </Target> |
| 521 | + |
509 | 522 | <!-- Publish all packages -->
|
510 | 523 | <Target Name="Publish">
|
511 | 524 | <Error Condition=" '$(NuGetKey)' == '' " Text="You must provide the NuGetKey parameter to the build: /p:NuGetKey=YOUR_PUBLISHING_KEY" />
|
|
0 commit comments