Skip to content

Commit

Permalink
bump: updates for apple silicon (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvlugter authored Jun 20, 2022
1 parent 9edd876 commit 860a0f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions codegen/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ lazy val `kalix-codegen-js-cli` =
buildInfoKeys := Seq[BuildInfoKey](version),
buildInfoPackage := "io.kalix.codegen.js",
name in NativeImage := "kalix-codegen-js",
nativeImageVersion := "22.1.0",
/**
* Due to limitations of the Windows command prompt/PowerShell, with a the native-image command fails with a long
* classpath By using sbt-assembly, we first build a fat JAR which is then able to be used in place of the full
Expand Down
8 changes: 7 additions & 1 deletion npm-js/kalix-scripts/bin/download-codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ const releases = {
win32_x86_64: 'kalix-codegen-js-x86_64-pc-windows-gnu',
};

const arch = process.arch === 'x64' ? 'x86_64' : 'x86_32';
const arch =
process.platform === 'darwin' && process.arch === 'arm64'
? 'x86_64' // use rosetta for darwin arm64 for now
: process.arch === 'x64'
? 'x86_64'
: 'x86_32';

const release = `${process.platform}_${arch}`;

// Windows requires executable files to have some file extension, but we need a consistent name cross-platform
Expand Down
5 changes: 2 additions & 3 deletions sdk/bin/download-protoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const rimraf = require('rimraf');

const downloadUrlPrefix =
'https://github.com/protocolbuffers/protobuf/releases/download/v';
const protocVersion = '3.15.6';
const protocVersion = '3.20.1';
function makeDownloadFile(platformArch) {
return 'protoc-' + protocVersion + '-' + platformArch + '.zip';
}
Expand Down Expand Up @@ -42,8 +42,7 @@ function determineDownloadFile() {
case 'x64':
return makeDownloadFile('osx-x86_64');
case 'arm64':
// use rosetta for now
return makeDownloadFile('osx-x86_64');
return makeDownloadFile('osx-aarch_64');
}
break;
}
Expand Down

0 comments on commit 860a0f5

Please sign in to comment.