File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ # GetLatest-FEVersion.ps1 (GHA output directly)
2+
3+ try {
4+ Write-Host " 🔎 Fetching latest version of Fiddler Everywhere..."
5+ $url = " https://www.telerik.com/support/whats-new/fiddler-everywhere/release-history"
6+
7+ $htmlContent = Invoke-RestMethod - Uri $url - Method Get
8+
9+ if ($htmlContent -match ' Fiddler Everywhere v(\d+\.\d+\.\d+)' ) {
10+ $version = $matches [1 ]
11+ Write-Host " ✅ Latest Version Found: $version "
12+
13+ # --- THIS IS THE NEW PART ---
14+ # Check if the GITHUB_OUTPUT environment variable exists.
15+ if ($env: GITHUB_OUTPUT ) {
16+ Write-Host " 🚀 Setting GitHub Actions output variable..."
17+ # Write in the format "key=value" to the file specified by GITHUB_OUTPUT
18+ echo " scraped_version=$version " | Out-File - Append - FilePath $env: GITHUB_OUTPUT
19+ }
20+ }
21+ else {
22+ throw " Could not find the version pattern in the page's HTML."
23+ }
24+ }
25+ catch {
26+ Write-Error $_.Exception.Message
27+ exit 1
28+ }
You can’t perform that action at this time.
0 commit comments