Skip to content

Commit 459baa4

Browse files
committed
no 0.8.0 on arm macos
1 parent 3a4746c commit 459baa4

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/test-workflow.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
12-
fpm-version: ["v0.8.0", "v0.9.0", "latest"]
12+
fpm-version: ["v0.8.0", "v0.9.0", "v0.10.1", "latest"]
1313
node-version: ["20.x"]
14+
exclude:
15+
# v0.8.0 install.sh is broken, can't be built from source on macOS ARM64
16+
- os: macos-14
17+
fpm-version: "v0.8.0"
1418

1519
steps:
1620
- name: Checkout

index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,21 @@ async function main(){
8686
// On macOS ARM64, fall back to building from source
8787
if (process.platform === 'darwin' && arch === 'arm64') {
8888
console.log('No pre-built ARM64 binary found, falling back to building from source');
89+
90+
// For older versions without working install.sh, we can't build from source
91+
const versionNum = fpmVersion.replace('v', '');
92+
const versionParts = versionNum.split('.').map(Number);
93+
const isOldVersion = versionParts[0] === 0 && versionParts[1] < 9;
94+
95+
if (isOldVersion) {
96+
core.setFailed(
97+
`Building fpm ${fpmVersion} from source is not supported on macOS ARM64.\n` +
98+
'Please use fpm v0.9.0 or later, which has a working install.sh script.\n' +
99+
'For example, set fpm-version to "v0.9.0", "v0.10.1" or "latest".'
100+
);
101+
return;
102+
}
103+
89104
await installFromSource(fpmVersion, fpmRepo);
90105
return;
91106
}

0 commit comments

Comments
 (0)