Skip to content

Commit 657e2ac

Browse files
committed
add show summary option for build and enable in ci
1 parent ad10d00 commit 657e2ac

File tree

5 files changed

+29
-6
lines changed

5 files changed

+29
-6
lines changed

eng/UpdateAzureSdkCodes.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@ param(
22
[Parameter(Mandatory)]
33
[string]$SdkRepoRoot,
44

5-
[string[]]$ServiceDirectoryFilters = @("*"))
5+
[string[]]$ServiceDirectoryFilters = @("*"),
6+
7+
[switch]$ShowSummary
8+
)
69

710
Write-Host "Generating Azure SDK Codes..."
811
foreach ($filter in $ServiceDirectoryFilters) {
912
Write-Host 'Generating projects under service directory ' -ForegroundColor Green -NoNewline
1013
Write-Host "$filter" -ForegroundColor Yellow
11-
dotnet msbuild /restore /t:GenerateCode /p:ServiceDirectory=$filter "$SdkRepoRoot\eng\service.proj"
14+
if ($ShowSummary)
15+
{
16+
dotnet msbuild /restore /t:GenerateCode /p:ServiceDirectory=$filter /v:n /ds "$SdkRepoRoot\eng\service.proj"
17+
}
18+
else
19+
{
20+
dotnet msbuild /restore /t:GenerateCode /p:ServiceDirectory=$filter "$SdkRepoRoot\eng\service.proj"
21+
}
1222
if ($LastExitCode -ne 0) {
1323
Write-Error 'Generation error'
1424
exit 1

eng/UpdateAzureSdkForNet.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ param(
88
[Parameter(Mandatory)]
99
[string]$SdkRepoRoot,
1010

11-
[string[]]$ServiceDirectoryFilters = @("*"))
11+
[string[]]$ServiceDirectoryFilters = @("*"),
12+
13+
[switch]$ShowSummary
14+
)
1215

1316
Invoke-Expression "$PSScriptRoot\UpdateGeneratorMetadata.ps1 -AutorestCSharpVersion $AutorestCSharpVersion -CadlEmitterVersion $CadlEmitterVersion -SdkRepoRoot $SdkRepoRoot"
1417

15-
Invoke-Expression "$PSScriptRoot\UpdateAzureSdkCodes.ps1 -SdkRepoRoot $SdkRepoRoot -ServiceDirectoryFilters $($ServiceDirectoryFilters -Join ',')"
18+
Invoke-Expression "$PSScriptRoot\UpdateAzureSdkCodes.ps1 -SdkRepoRoot $SdkRepoRoot -ServiceDirectoryFilters $($ServiceDirectoryFilters -Join ',') $(if ($ShowSummary) {'-ShowSummary'})"

eng/UpdateAzureSdkSamples.ps1

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@ param(
22
[Parameter(Mandatory)]
33
[string]$SdkRepoRoot,
44

5-
[string[]]$ServiceDirectoryFilters = @("*"))
5+
[string[]]$ServiceDirectoryFilters = @("*"),
6+
7+
[switch]$ShowSummary
8+
)
69

710
Write-Host "Generating Azure SDK Samples..."
811
foreach ($filter in $ServiceDirectoryFilters) {
912
Write-Host 'Generating projects under service directory ' -ForegroundColor Green -NoNewline
1013
Write-Host "$filter" -ForegroundColor Yellow
11-
dotnet msbuild /restore /t:GenerateTests /p:ServiceDirectory=$filter "$SdkRepoRoot\eng\service.proj"
14+
if ($ShowSummary) {
15+
dotnet msbuild /restore /t:GenerateTests /p:ServiceDirectory=$filter /v:n /ds "$SdkRepoRoot\eng\service.proj"
16+
}
17+
else {
18+
dotnet msbuild /restore /t:GenerateTests /p:ServiceDirectory=$filter "$SdkRepoRoot\eng\service.proj"
19+
}
1220
if ($LastExitCode -ne 0) {
1321
Write-Error 'Generation error'
1422
exit 1

eng/pipelines/update-azure-sdk-for-net-codes.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
-Branch auto-update-autorest-$(AutorestCSharpVersion)
3434
-SdkRepoRoot $(Build.SourcesDirectory)/azure-sdk-for-net
3535
-ServiceDirectoryFilters ${{ parameters.filter}}
36+
-ShowSummary
3637
failOnStderr: false
3738
workingDirectory: $(Build.SourcesDirectory)/autorest.csharp
3839
retryCountOnTaskFailure: 3

eng/pipelines/update-azure-sdk-for-net-samples.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
-Branch auto-update-autorest-$(AutorestCSharpVersion)
3434
-SdkRepoRoot $(Build.SourcesDirectory)/azure-sdk-for-net
3535
-ServiceDirectoryFilters ${{ parameters.filter}}
36+
-ShowSummary
3637
failOnStderr: false
3738
workingDirectory: $(Build.SourcesDirectory)/autorest.csharp
3839
retryCountOnTaskFailure: 3

0 commit comments

Comments
 (0)