Skip to content

Commit

Permalink
Merge pull request #1 from jgiannuzzi/fix-install-arm64
Browse files Browse the repository at this point in the history
Add support for arm64 architecture in postinstall task
  • Loading branch information
nojaf authored Feb 3, 2024
2 parents ce52ca8 + 15100f4 commit ffe7b90
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,36 @@ import os from 'os';
const exec = promisify(execCallback);

const platform = os.platform();
const arch = os.arch();
let rid = '';

switch (platform) {
case 'win32':
rid = 'win-x64';
rid = 'win-';
break;
case 'darwin':
rid = 'osx-x64';
rid = 'osx-';
break;
case 'linux':
rid = 'linux-x64';
rid = 'linux-';
break;
default:
console.error(`Unsupported platform: ${platform}`);
process.exit(1);
}

switch (arch) {
case 'x64':
rid += 'x64'
break;
case 'arm64':
rid += 'arm64';
break;
default:
console.error(`Unsupported architecture: ${arch}`);
process.exit(1);
}

console.log("About to publish Fable.Daemon");
const command = `dotnet publish Fable.Daemon/Fable.Daemon.fsproj --nologo -c Release -r ${rid} -p:PublishReadyToRun=true -o ./bin`;

Expand Down

0 comments on commit ffe7b90

Please sign in to comment.