wingetautoupdate/Winget-AutoUpdate/functions/Get-WAUAvailableVersion.ps1

6 lines
318 B
PowerShell
Raw Normal View History

2022-03-22 13:39:01 +00:00
function Get-WAUAvailableVersion{
#Get Github latest version
$WAUurl = 'https://api.github.com/repos/Romanitho/Winget-AutoUpdate/releases/latest'
$Script:WAULatestVersion = ((Invoke-WebRequest $WAUurl -UseBasicParsing | ConvertFrom-Json)[0].tag_name).Replace("v","")
return [version]$WAULatestVersion
}