Răsfoiți Sursa

[Infrastructure] Fixes the dependency update script for selenium and playwright (#60089)

Javier Calvarro Nelson 1 an în urmă
părinte
comite
bc92a2d9df

+ 1 - 1
.github/workflows/update-selenium-and-playwright-dependencies.yml

@@ -11,7 +11,7 @@ permissions:
   pull-requests: write
   pull-requests: write
 
 
 jobs:
 jobs:
-  update-jquery-validate:
+  update-selenium-and-playwright:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
 
 
     steps:
     steps:

+ 8 - 5
eng/scripts/update-selenium-and-playwright-versions.ps1

@@ -79,9 +79,12 @@ exit 1
 }
 }
 
 
 # Check if there are changes
 # Check if there are changes
-if (-not (git diff --cached --quiet)) {
+git diff --quiet
+if ($LASTEXITCODE -eq 0) {
     Write-Host "No changes to commit."
     Write-Host "No changes to commit."
-    exit 0
+    # exit 0
+}else {
+    Write-Host "Updating the version of packages";
 }
 }
 
 
 # Create a new branch
 # Create a new branch
@@ -93,9 +96,9 @@ git add eng/Versions.props src/Components/benchmarkapps/Wasm.Performance/dockerf
 # Commit the changes
 # Commit the changes
 $commitMessage = @"
 $commitMessage = @"
 [Infrastructure] Update Selenium and Playwright dependencies $(Get-Date -Format "yyyy-MM-dd")
 [Infrastructure] Update Selenium and Playwright dependencies $(Get-Date -Format "yyyy-MM-dd")
-* Updated Playwright version to $($versions["Microsoft.Playwright"])
-* Updated Selenium version to $($versions["Selenium.Support"])
-* Updated Selenium version to $($versions["Selenium.WebDriver"])
+* Updated Microsoft.Playwright version to $($versions["Microsoft.Playwright"])
+* Updated Selenium.Support version to $($versions["Selenium.Support"])
+* Updated Selenium.WebDriver version to $($versions["Selenium.WebDriver"])
 "@
 "@
 git commit -m $commitMessage
 git commit -m $commitMessage