2020-10-27 04:10:22 -07:00
|
|
|
Param
|
|
|
|
(
|
2020-11-01 02:44:26 -08:00
|
|
|
[parameter(Mandatory = $true)]
|
2020-10-27 04:10:22 -07:00
|
|
|
[string]
|
|
|
|
$Version,
|
2020-11-01 02:44:26 -08:00
|
|
|
[parameter(Mandatory = $true)]
|
2020-10-27 04:10:22 -07:00
|
|
|
[string]
|
|
|
|
$LinuxSHA,
|
2020-11-01 02:44:26 -08:00
|
|
|
[parameter(Mandatory = $true)]
|
2020-10-27 04:10:22 -07:00
|
|
|
[string]
|
2020-11-01 08:22:00 -08:00
|
|
|
$WindowsSHA,
|
|
|
|
[parameter(Mandatory = $true)]
|
|
|
|
[string]
|
|
|
|
$ThemesSHA
|
2020-10-27 04:10:22 -07:00
|
|
|
)
|
|
|
|
|
2020-11-01 04:35:34 -08:00
|
|
|
$content = Get-Content '.\oh-my-posh.json' -Raw
|
2020-10-27 04:10:22 -07:00
|
|
|
$content = $content.Replace('<VERSION>', $Version)
|
|
|
|
$content = $content.Replace('<HASH_LINUX>', $LinuxSHA)
|
|
|
|
$content = $content.Replace('<HASH_WINDOWS>', $WindowsSHA)
|
|
|
|
$fileHash = Get-FileHash post-install.ps1 -Algorithm SHA256
|
|
|
|
$content = $content.Replace('<HASH_INSTALL_SCRIPT>', $fileHash.Hash)
|
2020-11-01 08:22:00 -08:00
|
|
|
$content = $content.Replace('<HASH_THEMES>', $ThemesSHA)
|
2020-11-01 04:35:34 -08:00
|
|
|
$content | Out-File -Encoding 'UTF8' '.\oh-my-posh.json'
|