Skip to content

Commit 8ee5e81

Browse files
committed
fix code changes are not really generated
1 parent 02ca04d commit 8ee5e81

File tree

3 files changed

+62
-32
lines changed

3 files changed

+62
-32
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
param(
2+
[Parameter(Mandatory)]
3+
[string]$AutorestCSharpVersion,
4+
5+
[Parameter(Mandatory)]
6+
[string]$CadlEmitterVersion,
7+
8+
[Parameter(Mandatory)]
9+
[string]$SdkRepoRoot,
10+
11+
[string[]]$ServiceDirectoryFilters = @("*"),
12+
13+
[switch]$ShowSummary
14+
)
15+
16+
Invoke-Expression "$PSScriptRoot\UpdateGeneratorMetadata.ps1 -AutorestCSharpVersion $AutorestCSharpVersion -CadlEmitterVersion $CadlEmitterVersion -SdkRepoRoot $SdkRepoRoot"
17+
18+
Invoke-Expression "$PSScriptRoot\UpdateAzureSdkForNetSamples.ps1 -SdkRepoRoot $SdkRepoRoot -ServiceDirectoryFilters $($ServiceDirectoryFilters -Join ',') $(if ($ShowSummary) {'-ShowSummary'})"

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,20 @@ jobs:
2828
displayName: Update SDK codes ${{ parameters.filter }}
2929
inputs:
3030
pwsh: true
31-
filePath: $(Build.SourcesDirectory)/autorest.csharp/eng/UpdateAzureSdkCodes.ps1
31+
filePath: $(Build.SourcesDirectory)/autorest.csharp/eng/UpdateAzureSdkForNet.ps1
3232
arguments: >
33+
-AutorestCSharpVersion $(AutorestCSharpVersion)
34+
-CadlEmitterVersion $(CadlEmitterVersion)
3335
-SdkRepoRoot $(Build.SourcesDirectory)/azure-sdk-for-net
3436
-ServiceDirectoryFilters ${{ parameters.filter}}
3537
-ShowSummary
3638
failOnStderr: false
3739
workingDirectory: $(Build.SourcesDirectory)/autorest.csharp
3840
retryCountOnTaskFailure: 3
41+
- pwsh: |
42+
git restore eng/Packages.Data.props
43+
git restore eng/emitter-package.json
44+
workingDirectory: $(Build.SourcesDirectory)/azure-sdk-for-net
3945
- template: /eng/common/pipelines/templates/steps/git-push-changes.yml@azure-sdk-tools
4046
parameters:
4147
BaseRepoBranch: auto-update-autorest-$(AutorestCSharpVersion)

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

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,40 @@ jobs:
1414
CadlEmitterVersion: $[stageDependencies.Build_and_Test.Build.outputs['Publish.CadlEmitterVersion']]
1515
dependsOn: Update_Generator_Versions
1616
steps:
17-
- checkout: self
18-
fetchDepth: 1
19-
- checkout: azure-sdk-for-net
20-
- checkout: azure-sdk-tools
21-
fetchDepth: 1
22-
- task: UseDotNet@2
23-
displayName: 'Use .NET Core SDK'
24-
inputs:
25-
useGlobalJson: true
26-
performMultiLevelLookup: true
27-
- task: Powershell@2
28-
displayName: Update SDK samples ${{ parameters.filter }}
29-
inputs:
30-
pwsh: true
31-
filePath: $(Build.SourcesDirectory)/autorest.csharp/eng/UpdateAzureSdkSamples.ps1
32-
arguments: >
33-
-SdkRepoRoot $(Build.SourcesDirectory)/azure-sdk-for-net
34-
-ServiceDirectoryFilters ${{ parameters.filter}}
35-
-ShowSummary
36-
failOnStderr: false
37-
workingDirectory: $(Build.SourcesDirectory)/autorest.csharp
38-
retryCountOnTaskFailure: 3
39-
- template: /eng/common/pipelines/templates/steps/git-push-changes.yml@azure-sdk-tools
40-
parameters:
41-
BaseRepoBranch: auto-update-autorest-$(AutorestCSharpVersion)
42-
BaseRepoOwner: azure-sdk
43-
CommitMsg: Update SDK samples ${{ parameters.filter }}
44-
TargetRepoOwner: Azure
45-
TargetRepoName: azure-sdk-for-net
46-
WorkingDirectory: $(Build.SourcesDirectory)/azure-sdk-for-net
47-
ScriptDirectory: $(Build.SourcesDirectory)/azure-sdk-tools/eng/common/scripts
17+
- checkout: self
18+
fetchDepth: 1
19+
- checkout: azure-sdk-for-net
20+
- checkout: azure-sdk-tools
21+
fetchDepth: 1
22+
- task: UseDotNet@2
23+
displayName: 'Use .NET Core SDK'
24+
inputs:
25+
useGlobalJson: true
26+
performMultiLevelLookup: true
27+
- task: Powershell@2
28+
displayName: Update SDK samples ${{ parameters.filter }}
29+
inputs:
30+
pwsh: true
31+
filePath: $(Build.SourcesDirectory)/autorest.csharp/eng/UpdateAzureSdkSamplesForNet.ps1
32+
arguments: >
33+
-AutorestCSharpVersion $(AutorestCSharpVersion)
34+
-CadlEmitterVersion $(CadlEmitterVersion)
35+
-SdkRepoRoot $(Build.SourcesDirectory)/azure-sdk-for-net
36+
-ServiceDirectoryFilters ${{ parameters.filter}}
37+
-ShowSummary
38+
failOnStderr: false
39+
workingDirectory: $(Build.SourcesDirectory)/autorest.csharp
40+
retryCountOnTaskFailure: 3
41+
- pwsh: |
42+
git restore eng/Packages.Data.props
43+
git restore eng/emitter-package.json
44+
workingDirectory: $(Build.SourcesDirectory)/azure-sdk-for-net
45+
- template: /eng/common/pipelines/templates/steps/git-push-changes.yml@azure-sdk-tools
46+
parameters:
47+
BaseRepoBranch: auto-update-autorest-$(AutorestCSharpVersion)
48+
BaseRepoOwner: azure-sdk
49+
CommitMsg: Update SDK samples ${{ parameters.filter }}
50+
TargetRepoOwner: Azure
51+
TargetRepoName: azure-sdk-for-net
52+
WorkingDirectory: $(Build.SourcesDirectory)/azure-sdk-for-net
53+
ScriptDirectory: $(Build.SourcesDirectory)/azure-sdk-tools/eng/common/scripts

0 commit comments

Comments
 (0)