Merge branch 'main' into v2-MSI
commit
c6f0ea4366
|
@ -13,6 +13,9 @@ $null = cmd /c ''
|
||||||
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
||||||
$Script:ProgressPreference = 'SilentlyContinue'
|
$Script:ProgressPreference = 'SilentlyContinue'
|
||||||
|
|
||||||
|
#Set GitHub Repo
|
||||||
|
$Script:GitHub_Repo = "Winget-AutoUpdate"
|
||||||
|
|
||||||
#Log initialization
|
#Log initialization
|
||||||
$LogFile = "$WorkingDir\logs\updates.log"
|
$LogFile = "$WorkingDir\logs\updates.log"
|
||||||
|
|
||||||
|
|
|
@ -10,12 +10,12 @@ function Get-WAUAvailableVersion {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
#Get latest pre-release info
|
#Get latest pre-release info
|
||||||
$WAUurl = 'https://api.github.com/repos/Romanitho/Winget-AutoUpdate/releases'
|
$WAUurl = "https://api.github.com/repos/Romanitho/$($GitHub_Repo)/releases"
|
||||||
$WAUAvailableVersion = ((Invoke-WebRequest $WAUurl -UseBasicParsing | ConvertFrom-Json)[0].tag_name).Replace("v", "")
|
$WAUAvailableVersion = ((Invoke-WebRequest $WAUurl -UseBasicParsing | ConvertFrom-Json)[0].tag_name).Replace("v", "")
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
$url = "https://github.com/Romanitho/Winget-AutoUpdate/releases"
|
$url = "https://github.com/Romanitho/$($GitHub_Repo)/releases"
|
||||||
$link = ((Invoke-WebRequest $url -UseBasicParsing).Links.href -match "/Winget-AutoUpdate/releases/tag/v*")[0]
|
$link = ((Invoke-WebRequest $url -UseBasicParsing).Links.href -match "/$($GitHub_Repo)/releases/tag/v*")[0]
|
||||||
$WAUAvailableVersion = $link.Trim().Split("v")[-1]
|
$WAUAvailableVersion = $link.Trim().Split("v")[-1]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,12 +24,12 @@ function Get-WAUAvailableVersion {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
#Get latest stable info
|
#Get latest stable info
|
||||||
$WAUurl = 'https://api.github.com/repos/Romanitho/Winget-AutoUpdate/releases/latest'
|
$WAUurl = "https://api.github.com/repos/Romanitho/$($GitHub_Repo)/releases/latest"
|
||||||
$WAUAvailableVersion = ((Invoke-WebRequest $WAUurl -UseBasicParsing | ConvertFrom-Json)[0].tag_name).Replace("v", "")
|
$WAUAvailableVersion = ((Invoke-WebRequest $WAUurl -UseBasicParsing | ConvertFrom-Json)[0].tag_name).Replace("v", "")
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
$url = "https://github.com/Romanitho/Winget-AutoUpdate/releases/latest"
|
$url = "https://github.com/Romanitho/$($GitHub_Repo)/releases/latest"
|
||||||
$link = ((Invoke-WebRequest $url -UseBasicParsing).Links.href -match "/Winget-AutoUpdate/releases/tag/v*")[0]
|
$link = ((Invoke-WebRequest $url -UseBasicParsing).Links.href -match "/$($GitHub_Repo)/releases/tag/v*")[0]
|
||||||
$WAUAvailableVersion = $link.Trim().Split("v")[-1]
|
$WAUAvailableVersion = $link.Trim().Split("v")[-1]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
function Update-WAU {
|
function Update-WAU {
|
||||||
|
|
||||||
$OnClickAction = "https://github.com/Romanitho/Winget-AutoUpdate/releases"
|
$OnClickAction = "https://github.com/Romanitho/$($GitHub_Repo)/releases"
|
||||||
$Button1Text = $NotifLocale.local.outputs.output[10].message
|
$Button1Text = $NotifLocale.local.outputs.output[10].message
|
||||||
|
|
||||||
#Send available update notification
|
#Send available update notification
|
||||||
|
|
Loading…
Reference in New Issue