Skip to content

Commit c6c5c6a

Browse files
committed
Clean ts files for the supplied package only
1 parent c473f1a commit c6c5c6a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

scripts/clean-typescript-ccs-files.ps1

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ param (
33
[string]
44
$targetDirectory,
55
[string]
6-
$packageName = "@microsoft/agents-m365copilot",
7-
[Parameter(Mandatory = $true)]
8-
[string]
9-
$folderToClean
6+
$packageName = "@microsoft/agents-m365copilot"
107
)
118
Push-Location $targetDirectory
129

1310
$kiotaLockFileName = "kiota-lock.json"
11+
# Extract folder name from package name (the part after the slash)
12+
$folderToClean = $packageName.Split("/")[1]
1413
$folderToCleanPath = Join-Path $targetDirectory -ChildPath $folderToClean
1514

1615
# Check if the folder to clean exists
@@ -26,4 +25,4 @@ if (Test-Path $folderToCleanPath) {
2625
}
2726

2827
Pop-Location
29-
Write-Host "Cleaning operation completed for target: $folderToClean" -ForegroundColor Green
28+
Write-Host "Cleaning operation completed for target: $folderToClean derived from package: $packageName" -ForegroundColor Green

0 commit comments

Comments
 (0)