Skip to content

Commit

Permalink
feat(scoop): migrate to MSI
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed Nov 25, 2024
1 parent 45f4489 commit ab1fb14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 25 deletions.
6 changes: 3 additions & 3 deletions packages/scoop/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
27 changes: 5 additions & 22 deletions packages/scoop/oh-my-posh.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
}

0 comments on commit ab1fb14

Please sign in to comment.