From bfa098bfd7e5359c9db1bcc05092ec71bd68ebb5 Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Sat, 31 Aug 2024 13:49:39 +0200 Subject: [PATCH] Remove PreRelease version from Nightlies --- .github/workflows/WAU-AutoCreatePreVersion.yml | 2 +- Sources/WAU/Gui.ps1 | 2 +- Sources/WAU/Winget-AutoUpdate-Install.ps1 | 7 +------ Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/WAU-AutoCreatePreVersion.yml b/.github/workflows/WAU-AutoCreatePreVersion.yml index 8fda80e..b5d77d2 100644 --- a/.github/workflows/WAU-AutoCreatePreVersion.yml +++ b/.github/workflows/WAU-AutoCreatePreVersion.yml @@ -56,7 +56,7 @@ jobs: uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2 id: versioning with: - releaseType: prerelease + releaseType: Patch incrementPerCommit: false github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Sources/WAU/Gui.ps1 b/Sources/WAU/Gui.ps1 index da45dce..a521f2a 100644 --- a/Sources/WAU/Gui.ps1 +++ b/Sources/WAU/Gui.ps1 @@ -300,7 +300,7 @@ function Get-WAUConfiguratorLatestVersion { #Get latest stable info $WAUConfiguratorURL = 'https://api.github.com/repos/Romanitho/Winget-AutoUpdate/releases/latest' - $WAUConfiguratorLatestVersion = (((Invoke-WebRequest $WAUConfiguratorURL -UseBasicParsing | ConvertFrom-Json)[0].tag_name).Replace("v", "")).Replace("-", ".") + $WAUConfiguratorLatestVersion = (((Invoke-WebRequest $WAUConfiguratorURL -UseBasicParsing | ConvertFrom-Json)[0].tag_name).Replace("v", "")) if ([version]$WAUConfiguratorVersion -lt [version]$WAUConfiguratorLatestVersion) { diff --git a/Sources/WAU/Winget-AutoUpdate-Install.ps1 b/Sources/WAU/Winget-AutoUpdate-Install.ps1 index 1203bb5..c1d3620 100644 --- a/Sources/WAU/Winget-AutoUpdate-Install.ps1 +++ b/Sources/WAU/Winget-AutoUpdate-Install.ps1 @@ -263,12 +263,7 @@ function Install-WingetAutoUpdate { New-ItemProperty $regPath -Name Publisher -Value "Romanitho" -Force | Out-Null New-ItemProperty $regPath -Name URLInfoAbout -Value "https://github.com/Romanitho/Winget-AutoUpdate" -Force | Out-Null New-ItemProperty $regPath -Name WAU_NotificationLevel -Value $NotificationLevel -Force | Out-Null - if ($WAUVersion -match "-") { - New-ItemProperty $regPath -Name WAU_UpdatePrerelease -Value 1 -PropertyType DWord -Force | Out-Null - } - else { - New-ItemProperty $regPath -Name WAU_UpdatePrerelease -Value 0 -PropertyType DWord -Force | Out-Null - } + New-ItemProperty $regPath -Name WAU_UpdatePrerelease -Value 0 -PropertyType DWord -Force | Out-Null New-ItemProperty $regPath -Name WAU_PostUpdateActions -Value 0 -PropertyType DWord -Force | Out-Null New-ItemProperty $regPath -Name WAU_MaxLogFiles -Value $MaxLogFiles -PropertyType DWord -Force | Out-Null New-ItemProperty $regPath -Name WAU_MaxLogSize -Value $MaxLogSize -PropertyType DWord -Force | Out-Null diff --git a/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 b/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 index bc71e0d..47e95ca 100644 --- a/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 +++ b/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1 @@ -149,7 +149,7 @@ if (Test-Network) { #Get Available Version $Script:WAUAvailableVersion = Get-WAUAvailableVersion #Compare - if ([version]$WAUAvailableVersion.Replace("-", ".") -ne [version]$WAUCurrentVersion.Replace("-", ".")) { + if ([version]$WAUAvailableVersion -gt [version]$WAUCurrentVersion) { #If new version is available, update it Write-ToLog "WAU Available version: $WAUAvailableVersion" "Yellow" Update-WAU