Skip to content

Commit

Permalink
Sync tools folder from main branch to generation branch
Browse files Browse the repository at this point in the history
  • Loading branch information
azurepowershell committed May 10, 2024
1 parent 957fa8c commit 8a8038e
Show file tree
Hide file tree
Showing 8 changed files with 186 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/util/analyze-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ steps:

- template: publish-artifacts-steps.yml
parameters:
artifactName: analyze-${{ parameters.testFramework }}
artifactName: analyze-${{ parameters.testFramework }}-$(System.JobAttempt)
2 changes: 1 addition & 1 deletion .azure-pipelines/util/test-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ steps:

- template: publish-artifacts-steps.yml
parameters:
artifactName: test-${{ parameters.testFramework }}-${{ parameters.osName }}
artifactName: test-${{ parameters.testFramework }}-${{ parameters.osName }}-$(System.JobAttempt)
1 change: 1 addition & 0 deletions src/shared/ConfigKeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ internal static class ConfigKeys
public const string CheckForUpgrade = "CheckForUpgrade";
public const string EnvCheckForUpgrade = "AZUREPS_CHECK_FOR_UPGRADE";
public const string DisplaySecretsWarning = "DisplaySecretsWarning";
public const string LoginExperienceV2 = "LoginExperienceV2";
}
}
1 change: 1 addition & 0 deletions tools/Az/Az.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.19.0'; },
@{ModuleName = 'Az.RedisCache'; RequiredVersion = '1.9.1'; },
@{ModuleName = 'Az.RedisEnterpriseCache'; RequiredVersion = '1.2.1'; },
@{ModuleName = 'Az.Relay'; RequiredVersion = '2.0.1'; },
@{ModuleName = 'Az.ResourceGraph'; RequiredVersion = '0.13.1'; },
@{ModuleName = 'Az.ResourceMover'; RequiredVersion = '1.2.1'; },
@{ModuleName = 'Az.Resources'; RequiredVersion = '6.16.2'; },
@{ModuleName = 'Az.Security'; RequiredVersion = '1.6.2'; },
Expand Down
13 changes: 11 additions & 2 deletions tools/Gen2Master/MoveFromGeneration2Master.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Function Move-Generation2Master {
Copy-Template -SourceName Module.psd1 -DestPath $DestPath\$ModuleName -DestName "Az.$ModuleName.psd1" -ModuleName $ModuleName
$Psd1Metadata = Import-LocalizedData -BaseDirectory "$PSScriptRoot/Templates" -FileName "Module.psd1"
}
$moduleVersion = $Psd1Metadata.ModuleVersion
foreach ($submoduleDir in $submoduleDirs) {
$psd1File = Get-ChildItem -Filter *.psd1 -File -Path $submoduleDir.FullName
write-host ("psd1 file name {0}" -f $psd1File.Name)
Expand Down Expand Up @@ -110,8 +111,6 @@ Function Move-Generation2Master {
Copy-Item -Path $SourceItem -Destination (Join-Path -Path $DestPath -ChildPath $submoduleDir.Name)
}

#copy generated docs to help folder

# Update psd1
$SubModulePsd1MetaData = Import-LocalizedData -BaseDirectory (Join-Path -Path $SourcePath -ChildPath $submoduleDir.Name) -FileName "Az.$submoduleName.psd1"

Expand All @@ -138,6 +137,15 @@ Function Move-Generation2Master {

# Generate csproj file and add the dependency in the solution file
Copy-Template -SourceName Az.ModuleName.csproj -DestPath (Join-Path $DestPath $submoduleDir.Name) -DestName "Az.$submoduleName.csproj" -RootModuleName $ModuleName -ModuleName $submoduleName -ModuleFolder $submoduleDir.Name

# Copy the assemblyinfo file
$assemblyInfoPath = Join-Path $DestPath $ModuleName 'Properties' 'AssemblyInfo.cs'
Copy-Template -SourceName AssemblyInfo.cs -DestPath "$DestPath\$ModuleName\Properties" -DestName AssemblyInfo.cs -ModuleName $submoduleName
$assemblyInfo = Get-Content -Path $assemblyInfoPath
If ($assemblyInfo -Match "0.1.0") {
$assemblyInfo = $assemblyInfo -replace '0.1.0', $moduleVersion
}
$assemblyInfo | Set-Content $assemblyInfoPath -force
}

$slnFilePath = "$DestPath\$ModuleName.sln"
Expand Down Expand Up @@ -165,6 +173,7 @@ Function Move-Generation2Master {
$Psd1Metadata.NestedModules = Unique-PathList $Psd1Metadata.NestedModules

New-ModuleManifest -Path $DestPsd1Path @Psd1Metadata

# update module page
dotnet build $slnFilePath
# start a job to update markdown help module, since we can not uninstall a module in the same process.
Expand Down
169 changes: 169 additions & 0 deletions tools/StaticAnalysis/Exceptions/Az.Resources/BreakingChangeIssues.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ try {
npx autorest --use:@autorest/powershell@4.x --tag=package-features-2021-07
npx autorest --use:@autorest/powershell@4.x --tag=package-deploymentscripts-2020-10
npx autorest --use:@autorest/powershell@4.x --tag=package-resources-2021-04
npx autorest --use:@autorest/powershell@4.x --tag=package-deploymentstacks-2022-08-preview
npx autorest --use:@autorest/powershell@4.x --tag=package-deploymentstacks-2024-03
npx autorest --use:@autorest/powershell@4.x --tag=package-templatespecs-2021-05
}
else
Expand Down
1 change: 1 addition & 0 deletions tools/VersionController/MinimalVersion.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"Module","Minimal Version"
"Az.DnsResolver","1.0.0"
"Az.ResourceGraph","1.0.0"

0 comments on commit 8a8038e

Please sign in to comment.