-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_dagger_develop.ps1
More file actions
36 lines (29 loc) · 1.13 KB
/
run_dagger_develop.ps1
File metadata and controls
36 lines (29 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Get the current working directory
$rootDir = Get-Location
Write-Host "🔍 Searching for 'dagger.json' files..."
# Recursively search for dagger.json files
$daggerFiles = Get-ChildItem -Path $rootDir -Recurse -Filter "dagger.json"
if ($daggerFiles.Count -eq 0) {
Write-Host "⚠️ No 'dagger.json' files found. Exiting..." -ForegroundColor Yellow
exit 0
}
# Run in each directory where dagger.json is found
foreach ($file in $daggerFiles) {
$directory = $file.DirectoryName
Write-Host "📂 Entering directory: $directory"
Push-Location $directory
Write-Host "🚀 Running 'dagger develop'..."
try {
dagger develop
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ 'dagger develop' failed in $directory" -ForegroundColor Red
} else {
Write-Host "✅ 'dagger develop' completed successfully in $directory" -ForegroundColor Green
}
} catch {
Write-Host "🔥 An error occurred while running 'dagger develop' in `${directory}: $_" -ForegroundColor Red
} finally {
Pop-Location
}
}
Write-Host "🎉 All 'dagger develop' executions completed!"