chore(winget): set correct version string

This commit is contained in:
Jan De Dobbeleer 2024-11-30 20:23:03 +01:00 committed by Jan De Dobbeleer
parent ebbd7a230a
commit c63d0133f5
2 changed files with 9 additions and 6 deletions

View file

@ -11,42 +11,42 @@ InstallModes:
- silentWithProgress
Installers:
- Architecture: x64
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/<VERSION>/install-x64.msi
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-x64.msi
InstallerSha256: <HASH-AMD64>
Scope: machine
UpgradeBehavior: install
InstallerSwitches:
Custom: INSTALLER=winget ALLUSERS=1
- Architecture: x64
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/<VERSION>/install-x64.msi
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-x64.msi
InstallerSha256: <HASH-AMD64>
Scope: user
UpgradeBehavior: install
InstallerSwitches:
Custom: INSTALLER=winget
- Architecture: x86
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/<VERSION>/install-x86.msi
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-x86.msi
InstallerSha256: <HASH-386>
Scope: machine
UpgradeBehavior: install
InstallerSwitches:
Custom: INSTALLER=winget ALLUSERS=1
- Architecture: x86
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/<VERSION>/install-x86.msi
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-x86.msi
InstallerSha256: <HASH-386>
Scope: user
UpgradeBehavior: install
InstallerSwitches:
Custom: INSTALLER=winget
- Architecture: arm64
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/<VERSION>/install-arm64.msi
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-arm64.msi
InstallerSha256: <HASH-ARM64>
Scope: machine
UpgradeBehavior: install
InstallerSwitches:
Custom: INSTALLER=winget ALLUSERS=1
- Architecture: arm64
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/<VERSION>/install-arm64.msi
InstallerUrl: https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-arm64.msi
InstallerSha256: <HASH-ARM64>
Scope: user
UpgradeBehavior: install

View file

@ -50,6 +50,9 @@ function Write-MetaData {
$content | Out-File -Encoding 'UTF8' "./$Version/$FileName"
}
# clean version string
$Version = $Version.TrimStart('v')
New-Item -Path $PWD -Name $Version -ItemType "directory"
# Get all files inside the folder and adjust the version/hash
$HashAmd64 = Get-HashForArchitecture -Architecture 'x64' -Version $Version