diff --git a/packages/winget/JanDeDobbeleer.OhMyPosh.installer.yaml b/packages/winget/JanDeDobbeleer.OhMyPosh.installer.yaml index 8a63824752d2..53f542bface3 100644 --- a/packages/winget/JanDeDobbeleer.OhMyPosh.installer.yaml +++ b/packages/winget/JanDeDobbeleer.OhMyPosh.installer.yaml @@ -4,47 +4,53 @@ ReleaseDate: Platform: - Windows.Desktop MinimumOSVersion: 10.0.0.0 -InstallerType: inno +InstallerType: msi InstallModes: - interactive - silent - silentWithProgress Installers: - Architecture: x64 - InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-amd64.exe + InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-x64.msi InstallerSha256: Scope: machine + UpgradeBehavior: install InstallerSwitches: - Custom: /INSTALLER=winget /ALLUSERS + Custom: INSTALLER=winget ALLUSERS=1 - Architecture: x64 - InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-amd64.exe + InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-x64.msi InstallerSha256: Scope: user + UpgradeBehavior: install InstallerSwitches: - Custom: /INSTALLER=winget /CURRENTUSER + Custom: INSTALLER=winget - Architecture: x86 - InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-386.exe + InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-x86.msi InstallerSha256: Scope: machine + UpgradeBehavior: install InstallerSwitches: - Custom: /INSTALLER=winget /ALLUSERS + Custom: INSTALLER=winget ALLUSERS=1 - Architecture: x86 - InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-386.exe + InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-x86.msi InstallerSha256: Scope: user + UpgradeBehavior: install InstallerSwitches: - Custom: /INSTALLER=winget /CURRENTUSER + Custom: INSTALLER=winget - Architecture: arm64 - InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-arm64.exe + InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-arm64.msi InstallerSha256: Scope: machine + UpgradeBehavior: install InstallerSwitches: - Custom: /INSTALLER=winget /ALLUSERS + Custom: INSTALLER=winget ALLUSERS=1 - Architecture: arm64 - InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-arm64.exe + InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v/install-arm64.msi InstallerSha256: Scope: user + UpgradeBehavior: install InstallerSwitches: - Custom: /INSTALLER=winget /CURRENTUSER + Custom: INSTALLER=winget ManifestType: installer ManifestVersion: 1.6.0 diff --git a/packages/winget/build.ps1 b/packages/winget/build.ps1 index 1072bfca879e..c139aebaf6db 100644 --- a/packages/winget/build.ps1 +++ b/packages/winget/build.ps1 @@ -18,7 +18,7 @@ function Get-HashForArchitecture { [string] $Version ) - $hash = (new-object Net.WebClient).DownloadString("https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$Version/install-$Architecture.exe.sha256") + $hash = (new-object Net.WebClient).DownloadString("https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$Version/install-$Architecture.msi.sha256") return $hash.Trim() } @@ -52,15 +52,17 @@ function Write-MetaData { New-Item -Path $PWD -Name $Version -ItemType "directory" # Get all files inside the folder and adjust the version/hash -$HashAmd64 = Get-HashForArchitecture -Architecture 'amd64' -Version $Version +$HashAmd64 = Get-HashForArchitecture -Architecture 'x64' -Version $Version $HashArm64 = Get-HashForArchitecture -Architecture 'arm64' -Version $Version -$Hash386 = Get-HashForArchitecture -Architecture '386' -Version $Version +$Hash386 = Get-HashForArchitecture -Architecture 'x86' -Version $Version Get-ChildItem '*.yaml' | ForEach-Object -Process { Write-MetaData -FileName $_.Name -Version $Version -HashAmd64 $HashAmd64 -HashArm64 $HashArm64 -Hash386 $Hash386 } + if (-not $Token) { return } + # Install the latest wingetcreate exe # Need to do things this way, see https://github.com/PowerShell/PowerShell/issues/13138 Import-Module Appx -UseWindowsPowerShell