Skip to content

Commit 93d1a05

Browse files
authored
remove duplicated script (Azure#48743)
1 parent 87dcb5d commit 93d1a05

File tree

2 files changed

+15
-67
lines changed

2 files changed

+15
-67
lines changed

eng/scripts/typespec/Check-CodeGeneration.ps1

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@
33
$ErrorActionPreference = 'Stop'
44
Set-StrictMode -Version 3.0
55

6-
& "$PSScriptRoot/Generate-Code.ps1"
6+
$packageRoot = Resolve-Path "$PSScriptRoot../../../packages/http-client-csharp"
7+
Push-Location $packageRoot
78

8-
Write-Host 'Checking generated files difference...'
9-
git -c core.safecrlf=false diff --ignore-space-at-eol --exit-code
10-
if ($LastExitCode -ne 0) {
11-
Write-Error 'Generated codes are not up to date. Please run: eng/scripts/typespec/Generate-Code.ps1'
12-
exit 1
9+
try {
10+
& "$packageRoot/eng/scripts/Generate.ps1"
11+
12+
Write-Host 'Checking generated files difference...'
13+
git -c core.safecrlf=false diff --ignore-space-at-eol --exit-code
14+
if ($LastExitCode -ne 0) {
15+
Write-Error 'Generated codes are not up to date. Please run: eng/packages/http-client-csharp/eng/scripts/Generate.ps1'
16+
exit 1
17+
}
18+
Write-Host 'Done. No change is detected.'
19+
}
20+
finally {
21+
Pop-Location
1322
}
14-
Write-Host 'Done. No change is detected.'

eng/scripts/typespec/Generate-Code.ps1

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)