oh-my-posh/packages/inno/build.ps1

26 lines
1,003 B
PowerShell
Raw Normal View History

2021-01-28 12:53:45 -08:00
Param
(
[parameter(Mandatory = $true)]
[string]
$Version
)
New-Item -Path "." -Name "bin" -ItemType Directory
Copy-Item -Path "../../themes" -Destination "./bin" -Recurse
# download the files and pack them
@{name = 'posh-windows-amd64.exe' }, @{name = 'posh-linux-amd64' }, @{name = 'posh-windows-386.exe' } | ForEach-Object -Process {
2021-02-15 23:36:37 -08:00
$download = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$Version/$($_.name)"
2021-01-28 12:53:45 -08:00
Invoke-WebRequest $download -Out "./bin/$($_.name)"
}
2021-03-15 09:49:13 -07:00
# license
2021-02-15 23:36:37 -08:00
Invoke-WebRequest "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$Version/COPYING" -Out "./bin/COPYING.txt"
2021-01-28 12:53:45 -08:00
$content = Get-Content '.\oh-my-posh.iss' -Raw
$content = $content.Replace('<VERSION>', $Version)
$content | Out-File -Encoding 'UTF8' ".oh-my-posh-$Version.iss"
# package content
ISCC.exe ".oh-my-posh-$Version.iss"
# get hash
$zipHash = Get-FileHash 'Output/install.exe' -Algorithm SHA256
$zipHash.Hash | Out-File -Encoding 'UTF8' 'Output/install.exe.sha256'