Skip to content

Commit

Permalink
fix(linux): add armv7l build
Browse files Browse the repository at this point in the history
resolves #956
  • Loading branch information
JanDeDobbeleer committed Sep 14, 2021
1 parent a37ae4d commit 5de2c1a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/artifacts.yml
Expand Up @@ -18,6 +18,8 @@ jobs:
include:
- os: ubuntu-latest
goarch: arm64
- os: ubuntu-latest
goarch: arm
- os: windows-latest
goarch: 386
- os: windows-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -48,6 +48,8 @@ jobs:
include:
- os: ubuntu-latest
goarch: arm64
- os: ubuntu-latest
goarch: arm
- os: windows-latest
goarch: 386
- os: windows-latest
Expand Down
2 changes: 1 addition & 1 deletion packages/powershell/oh-my-posh/deploy.ps1
Expand Up @@ -20,7 +20,7 @@ Param
Copy-Item -Path "../../../themes" -Destination "./themes" -Recurse
# fetch all the binaries from the version's GitHub release
New-Item -Path "./" -Name "bin" -ItemType "directory"
"posh-windows-amd64.exe", "posh-windows-386.exe", "posh-windows-arm64.exe", "posh-darwin-amd64", "posh-linux-amd64", "posh-linux-arm64" | ForEach-Object -Process {
"posh-windows-amd64.exe", "posh-windows-386.exe", "posh-windows-arm64.exe", "posh-darwin-amd64", "posh-linux-amd64", "posh-linux-arm", "posh-linux-arm64" | ForEach-Object -Process {
$download = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$BinVersion/$_"
Invoke-WebRequest $download -Out "./bin/$_"
}
Expand Down
5 changes: 4 additions & 1 deletion packages/powershell/oh-my-posh/oh-my-posh.psm1
Expand Up @@ -14,9 +14,12 @@ function Get-PoshCommand {
if ($IsLinux) {
# this is rather hacky but there's no other way for the time being
$arch = uname -m
if (($arch -eq 'aarch64') -or ($arch -eq 'armv7l')) {
if ($arch -eq 'aarch64') {
return "$PSScriptRoot/bin/posh-linux-arm64"
}
if ($arch -eq 'armv7l') {
return "$PSScriptRoot/bin/posh-linux-arm"
}
return "$PSScriptRoot/bin/posh-linux-amd64"
}
$arch = (Get-CimInstance -Class Win32_Processor -Property Architecture).Architecture
Expand Down

0 comments on commit 5de2c1a

Please sign in to comment.