1
+ # Requires -Modules PSExcel
2
+ [CmdletBinding ()]
3
+ Param (
4
+ [Parameter ()]
5
+ [string ]$ExcelPath
6
+ )
7
+ $ExcelPath = Resolve-Path - Path $ExcelPath
8
+ If (Test-Path $ExcelPath ) {
9
+ Remove-Item $ExcelPath
10
+ }
11
+ $Path = [System.IO.Path ]::Combine($PSScriptRoot , ' ..' , ' ..' )
12
+ Set-Location - Path $Path
13
+ Get-ChildItem - Path .\tools\StaticAnalysis\Exceptions\ - Filter BreakingChangeIssues.csv - Recurse
14
+ dotnet msbuild / t:Clean
15
+ dotnet msbuild / t:Build
16
+ dotnet msbuild / t:StaticAnalysis
17
+ $BreakingChangeItems = Import-Csv .\artifacts\StaticAnalysisResults\BreakingChangeIssues.csv
18
+ $TotalTable = @ {}
19
+ foreach ($BreakingChangeItem in $BreakingChangeItems ) {
20
+ $ModuleName = ' Az' + $BreakingChangeItem.AssemblyFileName.Replace (" Microsoft.Azure.PowerShell.Cmdlets" , " " ).Replace(' .dll' , ' ' )
21
+ $CmdletName = $BreakingChangeItem.Target
22
+ $Description = $BreakingChangeItem.Description
23
+ if (-not $TotalTable.ContainsKey ($ModuleName )) {
24
+ $TotalTable.Add ($ModuleName , @ {})
25
+ }
26
+ if (-not $TotalTable [$ModuleName ].ContainsKey($CmdletName )) {
27
+ $TotalTable [$ModuleName ].Add($CmdletName , " " )
28
+ }
29
+ $TotalTable [$ModuleName ][$CmdletName ] = $TotalTable [$ModuleName ][$CmdletName ] + " $Description `n "
30
+ }
31
+
32
+ $Data = New-Object System.Collections.ArrayList
33
+ foreach ($ModuleName in $TotalTable.Keys ) {
34
+ foreach ($CmdletName in $TotalTable [$ModuleName ].Keys) {
35
+ $Tmp = New-Object - TypeName PSObject - Property @ {
36
+ ModuleName = $ModuleName
37
+ CmdletName = $CmdletName
38
+ Description = $TotalTable [$ModuleName ][$CmdletName ]
39
+ Before = $Null
40
+ After = $Null
41
+ TeamMember = $Null
42
+ PR = $Null
43
+ } | Select ModuleName, CmdletName, Description, Before, After, TeamMember, PR
44
+ $Null = $Data.Add ($Tmp )
45
+ }
46
+ }
47
+ $Data | Export-XLSX - Path $ExcelPath
48
+ Write-Host " Excel is generated at $ExcelPath . Please goto edit it."
0 commit comments