Skip to content
14 changes: 0 additions & 14 deletions eng/pipelines/typespec-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@ trigger:
- main
- typespec-next

pr:
branches:
include:
- main
- typespec-next
paths:
include:
- .gitattributes
- .prettierrc.json
- package-lock.json
- package.json
- tsconfig.json
- eng

jobs:
- job: Validate_All_Specs
pool:
Expand Down
3 changes: 0 additions & 3 deletions eng/pipelines/typespec-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ pr:
include:
- main
- typespec-next
paths:
include:
- specification

jobs:
- job: Validate_Changed_Specs
Expand Down
12 changes: 10 additions & 2 deletions eng/scripts/Get-TypeSpec-Folders.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@ param (
)

$tspFiles = @()
$allTspFiles = (Get-ChildItem -path ./specification tspconfig.yaml -Recurse).FullName -replace "$($pwd.Path)/"
if ([string]::IsNullOrEmpty($TargetBranch) -or [string]::IsNullOrEmpty($SourceBranch)) {
$tspFiles = (Get-ChildItem -path ./specification tspconfig.yaml -Recurse).FullName -replace "$($pwd.Path)/"
$tspFiles = $allTspFiles
}
else {
Write-Host "git -c core.quotepath=off -c i18n.logoutputencoding=utf-8 diff --name-only `"$TargetBranch...$SourceBranch`" -- | Where-Object {`$_.StartsWith('specification')}"
$tspFiles = git -c core.quotepath=off -c i18n.logoutputencoding=utf-8 diff --name-only `"$TargetBranch...$SourceBranch`" -- | Where-Object {$_.StartsWith('specification')}
$diffFiles = git -c core.quotepath=off -c i18n.logoutputencoding=utf-8 diff --name-only `"$TargetBranch...$SourceBranch`" --
$engFiles = $diffFiles | Where-Object {$_.StartsWith('eng')}
if ($engFiles) {
Comment thread
ckairen marked this conversation as resolved.
Outdated
$tspFiles = $allTspFiles
}
else {
$tspFiles = $diffFiles | Where-Object {$_.StartsWith('specification')}
}
}

$typespecFolders = @()
Expand Down