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]
|
|
|
|
$WindowsSHA
|
|
|
|
)
|
|
|
|
|
2020-11-01 02:44:26 -08:00
|
|
|
$content = Get-Content '.\scoop.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 02:44:26 -08:00
|
|
|
$content | Out-File -Encoding 'UTF8' '.\scoop.json'
|