Skip to content

Commit a73ad53

Browse files
committed
ci: moves the tsc steps before the metadata diff which switches branches
Signed-off-by: Vincent Biret <[email protected]>
1 parent b296b9b commit a73ad53

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

.azure-pipelines/generation-templates/capture-metadata.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,23 @@ steps:
5151
- template: checkout-metadata.yml
5252
- template: set-user-config.yml
5353

54+
# required for TypeSpec
55+
- task: UseNode@1
56+
inputs:
57+
versionSpec: '22.x'
58+
checkLatest: true
59+
60+
- pwsh: 'npm install -g @typespec/compiler typescript'
61+
displayName: 'install TypeSpec and TypeScript globally'
62+
63+
- pwsh: 'npm ci'
64+
displayName: 'install TypeSpec dependencies'
65+
workingDirectory: '$(metadataTypeSpecAnnotationsSource)'
66+
67+
- pwsh: 'tsc compile .'
68+
displayName: 'compile TypeSpec annotations'
69+
workingDirectory: '$(metadataTypeSpecAnnotationsSource)'
70+
5471
# Results in a raw metadata file written to microsoftgraph/msgraph-metadata if there are changes.
5572
# An error will cancel this step if there are no changes.
5673
- pwsh: '$(scriptsDirectory)/download-diff-metadata.ps1'
@@ -69,23 +86,6 @@ steps:
6986
parameters:
7087
version: '8.x'
7188

72-
# required for TypeSpec
73-
- task: UseNode@1
74-
inputs:
75-
versionSpec: '22.x'
76-
checkLatest: true
77-
78-
- pwsh: 'npm install -g @typespec/compiler typescript'
79-
displayName: 'install TypeSpec and TypeScript globally'
80-
81-
- pwsh: 'npm ci'
82-
displayName: 'install TypeSpec dependencies'
83-
workingDirectory: '$(metadataTypeSpecAnnotationsSource)'
84-
85-
- pwsh: 'tsc compile .'
86-
displayName: 'compile TypeSpec annotations'
87-
workingDirectory: '$(metadataTypeSpecAnnotationsSource)'
88-
8989
## Only run if the previous step was successful
9090
- pwsh: '$(scriptsDirectory)/run-typewriter-clean-metadata.ps1'
9191
env:

0 commit comments

Comments
 (0)