diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e5f17d..9cf2916 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,15 +40,19 @@ jobs: .\warp-cli.exe connect # Add a loop to wait for the status to be connected - while ($true) { + for ($attemptCount = 0; $attemptCount -lt 10; $attemptCount++) { $output = .\warp-cli.exe status Write-Host $output if ($output -like "*Status update: Connected*") { break } Start-Sleep -Seconds 5 # Wait for 5 seconds before checking again + } + if ($attemptCount -eq 10) { + Write-Host "Failed to connect after 10 attempts." + exit 1 # Exit with an error code } - + - name: Generate version based on current date and time id: generate_version shell: pwsh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 157ada1..54eea0c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,13 +32,17 @@ jobs: .\warp-cli.exe connect # Add a loop to wait for the status to be connected - while ($true) { + for ($attemptCount = 0; $attemptCount -lt 10; $attemptCount++) { $output = .\warp-cli.exe status Write-Host $output if ($output -like "*Status update: Connected*") { break } Start-Sleep -Seconds 5 # Wait for 5 seconds before checking again + } + if ($attemptCount -eq 10) { + Write-Host "Failed to connect after 10 attempts." + exit 1 # Exit with an error code } - name: Generate version based on current date and time