fix(msi): use script switches
Some checks are pending
Code QL / code-ql (push) Waiting to run
Release / changelog (push) Waiting to run
Release / artifacts (push) Blocked by required conditions

This commit is contained in:
Jan De Dobbeleer 2024-11-23 22:53:45 +01:00 committed by Jan De Dobbeleer
parent 49a123ad9a
commit 7081157740
2 changed files with 5 additions and 9 deletions

View file

@ -24,7 +24,7 @@ jobs:
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
run: |
$version = $env:GITHUB_REF.TrimStart("refs/tags/v")
./build.ps1 -Architecture ${{ matrix.arch }} -Version $version -Sign
./build.ps1 -Architecture ${{ matrix.arch }} -Version $version -Download -Sign
- name: Upload artifacts 🆙
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:

View file

@ -9,12 +9,8 @@ Param
[parameter(Mandatory = $false)]
[string]
$SDKVersion = "10.0.22621.0",
[parameter(Mandatory = $false)]
[boolean]
$Download = $true,
[parameter(Mandatory = $false)]
[boolean]
$Sign = $false
[switch]$Download,
[switch]$Sign
)
$PSDefaultParameterValues['Out-File:Encoding'] = 'UTF8'
@ -26,8 +22,8 @@ if ($Download) {
# download the executable
$file = "posh-windows-$Architecture.exe"
$name = "oh-my-posh.exe"
$download = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$Version/$($file)"
Invoke-WebRequest $download -Out "./dist/$($name)"
$url = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$Version/$($file)"
Invoke-WebRequest $url -Out "./dist/$($name)"
}
# variables