Skip to content

Commit 39c9486

Browse files
Create GetLatest-FEVersion.ps1
1 parent 0f9c2af commit 39c9486

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
}

0 commit comments

Comments
 (0)