mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-21 02:55:37 -08:00
feat(scoop): migrate to MSI
This commit is contained in:
parent
45f448934c
commit
ab1fb14988
|
@ -14,14 +14,14 @@ 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()
|
||||
}
|
||||
|
||||
New-Item -Path "." -Name "dist" -ItemType "directory"
|
||||
|
||||
$HashAmd64 = Get-HashForArchitecture -Architecture 'amd64' -Version $Version
|
||||
$Hash386 = Get-HashForArchitecture -Architecture '386' -Version $Version
|
||||
$HashAmd64 = Get-HashForArchitecture -Architecture 'x64' -Version $Version
|
||||
$Hash386 = Get-HashForArchitecture -Architecture 'x86' -Version $Version
|
||||
|
||||
$content = Get-Content '.\oh-my-posh.json' -Raw
|
||||
$content = $content.Replace('<VERSION>', $Version)
|
||||
|
|
|
@ -8,39 +8,22 @@
|
|||
},
|
||||
"architecture": {
|
||||
"64bit": {
|
||||
"url": "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-amd64.exe",
|
||||
"url": "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-x64.msi",
|
||||
"hash": "<HASH-AMD64>"
|
||||
},
|
||||
"32bit": {
|
||||
"url": "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-386.exe",
|
||||
"url": "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-x86.msi",
|
||||
"hash": "<HASH-386>"
|
||||
}
|
||||
},
|
||||
"installer": {
|
||||
"args": [
|
||||
"/CURRENTUSER",
|
||||
"/VERYSILENT",
|
||||
"/INSTALLER=scoop"
|
||||
"/quiet",
|
||||
"INSTALLER=scoop"
|
||||
]
|
||||
},
|
||||
"checkver": {
|
||||
"github": "https://github.com/JanDeDobbeleer/oh-my-posh"
|
||||
},
|
||||
"post_install": [
|
||||
"Write-Host 'Thanks for installing Oh My Posh.'",
|
||||
"Write-Host 'Have a look at https://ohmyposh.dev for detailed instructions for your shell.'"
|
||||
],
|
||||
"autoupdate": {
|
||||
"architecture": {
|
||||
"64bit": {
|
||||
"url": "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-amd64.exe"
|
||||
},
|
||||
"32bit": {
|
||||
"url": "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v<VERSION>/install-386.exe"
|
||||
}
|
||||
},
|
||||
"hash": {
|
||||
"url": "$url.sha256"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue