Skip to content

Sync tools code from main branch to generation branch #20666

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

Merged
merged 1 commit into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/Az/Az.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ DotNetFrameworkVersion = '4.7.2'
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.11.0'; },
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.11.1'; },
@{ModuleName = 'Az.Advisor'; RequiredVersion = '2.0.0'; },
@{ModuleName = 'Az.Aks'; RequiredVersion = '5.2.0'; },
@{ModuleName = 'Az.AnalysisServices'; RequiredVersion = '1.1.4'; },
Expand Down
2 changes: 1 addition & 1 deletion tools/AzPreview/AzPreview.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ DotNetFrameworkVersion = '4.7.2'
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.11.0'; },
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.11.1'; },
@{ModuleName = 'Az.ADDomainServices'; RequiredVersion = '0.2.0'; },
@{ModuleName = 'Az.Advisor'; RequiredVersion = '2.0.0'; },
@{ModuleName = 'Az.Aks'; RequiredVersion = '5.2.0'; },
Expand Down
2 changes: 1 addition & 1 deletion tools/CheckAssemblies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function Get-PreloadAssemblies{
Write-Host "Getting preload assemblies in $BuildFolder for $ModuleFolder"
Add-Type -Path ([System.IO.Path]::Combine($BuildFolder, "Az.Accounts", "Microsoft.Azure.PowerShell.AssemblyLoading.dll"))
$assemblyRootPath = [System.IO.Path]::Combine($BuildFolder, "Az.Accounts", "lib")
$conditionalAssemblyContext = [Microsoft.Azure.PowerShell.AssemblyLoading.ConditionalAssemblyContext]::new($Host.Version)
$conditionalAssemblyContext = [Microsoft.Azure.PowerShell.AssemblyLoading.ConditionalAssemblyContext]::new($PSVersionTable.PSEdition, $PSVersionTable.PSVersion)
[Microsoft.Azure.PowerShell.AssemblyLoading.ConditionalAssemblyProvider]::Initialize($assemblyRootPath, $conditionalAssemblyContext)
$assemblyDict = [Microsoft.Azure.PowerShell.AssemblyLoading.ConditionalAssemblyProvider]::GetAssemblies()
return $assemblyDict.Keys
Expand Down
264 changes: 132 additions & 132 deletions tools/Docs/az-ps-latest.csv

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion tools/ExecuteCIStep.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ If ($Build)
{
$ModuleInfoList += @{
Module = "Az.$ModuleName";
Status = $DependencyStepStatus;
Status = "Running";
Content = "";
}
}
$Detail = @{
Platform = $Platform;
Modules = $ModuleInfoList;
}
$Template.$DependencyStep.Details += $Detail
Expand Down
15 changes: 10 additions & 5 deletions tools/Gen2Master/MoveFromGeneration2Master.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,12 @@ Function Move-Generation2MasterHybrid {
dotnet sln $SolutionPath add (Join-Path -Path (Join-Path -Path $DestPath -ChildPath $submoduleDir.Name) -ChildPath Az.$submoduleName.csproj)

# Update psd1
$DestPsd1Path = Join-Path -Path (Join-Path -Path $DestPath -ChildPath $ModuleName) -ChildPath "Az.$ModuleName.psd1"
$Psd1Metadata = Import-LocalizedData -BaseDirectory (Join-Path -Path $DestPath -ChildPath $ModuleName) -FileName "Az.$ModuleName.psd1"
$Psd1FolderPostfix = '';
if (-not (Test-Path (Join-Path -Path (Join-Path -Path $DestPath -ChildPath $ModuleName) -ChildPath "Az.$ModuleName.psd1"))) {
$Psd1FolderPostfix = '.Management'
}
$DestPsd1Path = Join-Path -Path (Join-Path -Path $DestPath -ChildPath $ModuleName$Psd1FolderPostfix) -ChildPath "Az.$ModuleName.psd1"
$Psd1Metadata = Import-LocalizedData -BaseDirectory (Join-Path -Path $DestPath -ChildPath $ModuleName$Psd1FolderPostfix) -FileName "Az.$ModuleName.psd1"
$SubModulePsd1MetaData = Import-LocalizedData -BaseDirectory (Join-Path -Path $SourcePath -ChildPath $submoduleDir.Name) -FileName "Az.$submoduleName.psd1"
if (!@($Psd1Metadata.RequiredAssemblies).Contains(("{0}\bin\Az.${submoduleName}.private.dll" -f $submoduleDir.Name))) {
$Psd1Metadata.RequiredAssemblies = @($Psd1Metadata.RequiredAssemblies) + ("{0}\bin\Az.${submoduleName}.private.dll" -f $submoduleDir.Name)
Expand Down Expand Up @@ -339,11 +343,12 @@ Function Move-Generation2MasterHybrid {
$job = start-job {
param(
[string] $ModuleName,
[string] $DestPath
[string] $DestPath,
[string] $Psd1FolderPostfix
)
Import-Module "$DestPath\..\..\artifacts\Debug\Az.$ModuleName\Az.$ModuleName.psd1"
Update-MarkdownHelpModule -Path "$DestPath\$ModuleName\help" -RefreshModulePage -AlphabeticParamsOrder -UseFullTypeName -ExcludeDontShow
} -ArgumentList $ModuleName, $DestPath
Update-MarkdownHelpModule -Path "$DestPath\$ModuleName$Psd1FolderPostfix\help" -RefreshModulePage -AlphabeticParamsOrder -UseFullTypeName -ExcludeDontShow
} -ArgumentList $ModuleName, $DestPath, $Psd1FolderPostfix

$job | Wait-Job | Receive-Job
# Import-Module "$DestPath\..\..\artifacts\Debug\Az.$ModuleName\Az.$ModuleName.psd1"
Expand Down
14 changes: 7 additions & 7 deletions tools/PipelineResultTemplate.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"build": {
"Name": "Build",
"PhaseName": "Build",
"Order": 1,
"Details": [
]
},
"breaking-change": {
"Name": "Breaking Change Check",
"PhaseName": "Breaking Change Check",
"Order": 2,
"Details": [
]
},
"signature": {
"Name": "Signature Check",
"PhaseName": "Signature Check",
"Order": 3,
"Details": [
]
},
"help-example": {
"Name": "Help Example Check",
"PhaseName": "Help Example Check",
"Order": 4,
"Details": [
]
},
"help": {
"Name": "Help File Existence Check",
"PhaseName": "Help File Existence Check",
"Order": 5,
"Details": [
]
},
"file-change": {
"Name": "File Change Check",
"PhaseName": "File Change Check",
"Order": 6,
"Details": [
]
},
"test": {
"Name": "Test",
"PhaseName": "Test",
"Order": 100,
"Details": [
]
Expand Down
22 changes: 11 additions & 11 deletions tools/StaticAnalysis/CollectStaticAnalysisPipelineResult.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,32 @@ ForEach ($Step In $DependencyStepList)

$Steps = @(
@{
StepName = "breaking-change"
PhaseName = "breaking-change"
IssuePath = "$StaticAnalysisOutputDirectory/BreakingChangeIssues.csv"
},
@{
StepName = "help"
PhaseName = "help"
IssuePath = "$StaticAnalysisOutputDirectory/HelpIssues.csv"
},
@{
StepName = "help-example"
PhaseName = "help-example"
IssuePath = "$StaticAnalysisOutputDirectory/ExampleIssues.csv"
},
@{
StepName = "signature"
PhaseName = "signature"
IssuePath = "$StaticAnalysisOutputDirectory/SignatureIssues.csv"
},
@{
StepName = "file-change"
PhaseName = "file-change"
IssuePath = "$StaticAnalysisOutputDirectory/FileChangeIssue.csv"
}
)

ForEach ($Step In $Steps)
{
$StepName = $Step.StepName
$PhaseName = $Step.PhaseName
$IssuePath = $Step.IssuePath
$Details = $Template.$StepName.Details
$Details = $Template.$PhaseName.Details
If ($Details.Length -Ne 0)
{
$Details = $Details[0]
Expand Down Expand Up @@ -115,11 +115,11 @@ ForEach ($Step In $Steps)
{
#Region generate table head of each step
$NormalSteps = [System.Collections.Generic.HashSet[String]]@("breaking-change", "help", "signature", "file-change")
If ($NormalSteps.Contains($StepName))
If ($NormalSteps.Contains($PhaseName))
{
$Content = "|Type|Cmdlet|Description|Remediation|`n|---|---|---|---|`n"
}
ElseIf ($StepName -Eq "help-example")
ElseIf ($PhaseName -Eq "help-example")
{
$Content = "|Type|Cmdlet|Example|Line|RuleName|Description|Extent|Remediation|`n|---|---|---|---|---|---|---|---|`n"
}
Expand All @@ -136,11 +136,11 @@ ForEach ($Step In $Steps)
$ErrorTypeEmoji = "⚠️"
}
#Region generate table content of each step
If ($NormalSteps.Contains($StepName))
If ($NormalSteps.Contains($PhaseName))
{
$Content += "|$ErrorTypeEmoji|$($Issue.Target)|$($Issue.Description)|$($Issue.Remediation)|`n"
}
ElseIf ($StepName -Eq "help-example")
ElseIf ($PhaseName -Eq "help-example")
{
$Content += "|$ErrorTypeEmoji|$($Issue.Target)|$($Issue.Example)|$($Issue.Line)|$($Issue.RuleName)|$($Issue.Description)|$($Issue.Extent)|$($Issue.Remediation)|`n"
}
Expand Down
Loading