File tree Expand file tree Collapse file tree 2 files changed +31
-2
lines changed
.azure-pipelines/generation-templates Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ parameters:
33 type : string
44 - name : packageName
55 type : string
6- default : ' @microsoft/copilot-beta-sdk '
6+ default : ' @microsoft/agents-m365copilot '
77
88steps :
9- - pwsh : ' $(scriptsDirectory)/clean-typescript-files.ps1 -targetDirectory "$(Build.SourcesDirectory)/${{ parameters.repoName }}/packages/" -packageName "${{ parameters.packageName }}"'
9+ - pwsh : ' $(scriptsDirectory)/clean-typescript-ccs- files.ps1 -targetDirectory "$(Build.SourcesDirectory)/${{ parameters.repoName }}/packages/" -packageName "${{ parameters.packageName }}"'
1010 displayName : ' Remove generated models and requests from the repo folder'
1111
1212 - pwsh : ' $(scriptsDirectory)/copy-ccs-typescript-sdk-models.ps1 -sourceDirectory "$(kiotaDirectory)/output/*" -targetDirectory "$(Build.SourcesDirectory)/${{ parameters.repoName }}/packages/" -packageName "${{ parameters.packageName }}"'
Original file line number Diff line number Diff line change 1+ param (
2+ [Parameter (Mandatory = $true )]
3+ [string ]
4+ $targetDirectory ,
5+ [string ]
6+ $packageName = " @microsoft/agents-m365copilot" ,
7+ [Parameter (Mandatory = $true )]
8+ [string ]
9+ $folderToClean
10+ )
11+ Push-Location $targetDirectory
12+
13+ $kiotaLockFileName = " kiota-lock.json"
14+ $folderToCleanPath = Join-Path $targetDirectory - ChildPath $folderToClean
15+
16+ # Check if the folder to clean exists
17+ if (Test-Path $folderToCleanPath ) {
18+ Write-Host " Cleaning contents in: $folderToClean " - ForegroundColor Cyan
19+ Push-Location $folderToCleanPath
20+ Get-ChildItem - Directory | ForEach-Object { Remove-Item - r $_.FullName }
21+ Remove-Item $kiotaLockFileName - ErrorAction SilentlyContinue - Verbose
22+ Pop-Location
23+ Write-Host " Successfully cleaned contents in: $folderToClean " - ForegroundColor Green
24+ } else {
25+ Write-Host " Warning: Folder '$folderToClean ' does not exist in the target directory." - ForegroundColor Yellow
26+ }
27+
28+ Pop-Location
29+ Write-Host " Cleaning operation completed for target: $folderToClean " - ForegroundColor Green
You can’t perform that action at this time.
0 commit comments