Skip to content

Commit bfd5282

Browse files
authored
fix: correct Windows release artifact name (#48)
2 parents 5bf0d2c + 1bb446f commit bfd5282

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

install.ps1

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@ function Get-LatestRelease {
2424
}
2525

2626
function Main {
27-
$os = "windows"
27+
$os = "Windows"
2828
$arch = Get-Arch
29+
30+
switch ($arch) {
31+
"amd64" { $releaseArch = "x86_64" }
32+
"arm64" { $releaseArch = "arm64" }
33+
}
34+
2935
$version = Get-LatestRelease
3036
$versionNum = $version -replace "^v", ""
31-
$filename = "gitx_${versionNum}_${os}_${arch}.zip"
37+
$filename = "gitx_${os}_${releaseArch}.zip"
3238
$downloadUrl = "https://github.com/$repo/releases/download/$version/$filename"
3339

3440
Write-Host "Downloading gitx $version for $os/$arch..."
@@ -56,4 +62,4 @@ function Main {
5662
Write-Host "Run 'gitx.exe' to get started."
5763
}
5864

59-
Main
65+
Main

0 commit comments

Comments
 (0)