Skip to content

Commit

Permalink
[TypeSpec Validation] Fixes "trigger on only specification/<service-f…
Browse files Browse the repository at this point in the history
…amily> (#26276)" (#26321)

* test

* fix

* cleanup

* fix checkall scenario

* testing

* cleanup

* cleanup

* test run

* test run

* test run

* Revert "test run"

This reverts commit 06ba8db.

* Revert "test run"

This reverts commit a0f024a.

* Revert "test run"

This reverts commit fe26671.
  • Loading branch information
ckairen authored and jnlycklama committed Nov 8, 2023
1 parent a53b426 commit b5a6cfc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eng/scripts/Get-TypeSpec-Folders.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Set-StrictMode -Version 3
. $PSScriptRoot/ChangedFiles-Functions.ps1

$repoPath = Resolve-Path "$PSScriptRoot/../.."
$checkAllPath = "specification"
$checkAllPath = ((Get-ChildItem "specification" -Directory).Name -replace '^', 'specification/') -replace '$', '/'

if ($CheckAll) {
$changedFiles = $checkAllPath
Expand All @@ -28,9 +28,9 @@ else {
$typespecFolders = @()
$skippedTypespecFolders = @()
foreach ($file in $changedFiles) {
if ($file -match 'specification(\/[^\/]*\/)*') {
if ($file -match 'specification(\/[^\/]+\/)+') {
$path = "$repoPath/$($matches[0])"
if (Test-Path $path) {
if (Test-Path $path) {
Write-Verbose "Checking for tspconfig files under $path"
$typespecFolder = Get-ChildItem -path $path tspconfig.* -Recurse
if ($typespecFolder) {
Expand Down

0 comments on commit b5a6cfc

Please sign in to comment.