Files
RustDeskAutomaton/scripts/Get-LatestRustDeskVersion.ps1
Jakub Tucek 472cd9e57c
Some checks failed
rustdesk-auto-build / build-and-publish (push) Has been cancelled
Add scripts for building and managing RustDesk versions
- Implement Build-CustomRustDesk.ps1 to build RustDesk with specified version and configuration.
- Create Get-LastBuiltVersion.ps1 to retrieve the last built version from a state file.
- Add Get-LatestRustDeskVersion.ps1 to fetch the latest version from GitHub releases.
- Develop Invoke-RustDeskPipeline.ps1 to orchestrate the build and deployment process.
- Introduce Publish-Artifacts.ps1 for publishing build artifacts via SMB or SCP.
- Implement Set-LastBuiltVersion.ps1 to update the state file with the last built version.
2026-03-17 14:20:29 +01:00

17 lines
488 B
PowerShell

function Get-LatestRustDeskVersion {
[CmdletBinding()]
param()
$url = "https://api.github.com/repos/rustdesk/rustdesk/releases/latest"
# GitHub API can reject requests without a User-Agent.
$headers = @{ "User-Agent" = "rustdesk-gitea-automation" }
$response = Invoke-RestMethod -Method Get -Uri $url -Headers $headers
if (-not $response.tag_name) {
throw "Unable to read latest RustDesk tag_name from GitHub API response."
}
return [string]$response.tag_name
}