Skip to content

Commit

Permalink
add macOS arm64 binary
Browse files Browse the repository at this point in the history
  • Loading branch information
jansedivy committed May 2, 2023
1 parent 7b34b50 commit fa59719
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FLOW_BINS = \
flow-linux64-v$(FLOW_VERSION)/flow \
flow-linux-arm64-v$(FLOW_VERSION)/flow \
flow-osx-v$(FLOW_VERSION)/flow \
flow-osx-arm64-v$(FLOW_VERSION)/flow \
flow-win64-v$(FLOW_VERSION)/flow.exe

.PHONY: all
Expand Down Expand Up @@ -66,6 +67,9 @@ flow-linux-arm64-v%/flow:
flow-osx-v%/flow:
$(get-flow)

flow-osx-arm64-v%/flow:
$(get-flow)

flow-win64-v%/flow.exe:
$(get-flow)

Expand Down
1 change: 1 addition & 0 deletions SHASUM256.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
9122b5ce748c4bc1da7fcea9142ec1c9ac75f38d469e44bab76f0efc4058ab6c flow-linux64-v0.205.0/flow
e618a33a5cc1bf116e006c64fb010b7f7e0d6641b497ad8ba9c80423fa3c4bb7 flow-linux-arm64-v0.205.0/flow
70cfea7dd7a1ed2a70bc39daa6c8c2a19ebe0b55ba459c241a2be9356d75f120 flow-osx-v0.205.0/flow
5230400a7d29e693a55abeccbe36f66b563ccb20f55a67e1086a5bd6f7c304a4 flow-osx-arm64-v0.205.0/flow
c3534acd521e5223e8f91754df4fb0709b2b9d9d816e03b2f08188e550c6edac flow-win64-v0.205.0/flow.exe
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ var VERSION = require('./package.json').version;
var path = require('path');

module.exports =
process.platform === 'darwin'
process.platform === 'darwin' && process.arch === 'x64'
? path.join(__dirname, 'flow-osx-v' + VERSION, 'flow') :
process.platform === 'darwin' && process.arch === 'arm64'
? path.join(__dirname, 'flow-osx-arm64-v' + VERSION, 'flow') :
process.platform === 'linux' && process.arch === 'x64'
? path.join(__dirname, 'flow-linux64-v' + VERSION, 'flow') :
process.platform === 'linux' && process.arch === 'arm64'
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"flow-linux64-v*/flow",
"flow-linux-arm64-v*/flow",
"flow-osx-v*/flow",
"flow-osx-arm64-v*/flow",
"flow-win64-v*/flow.exe",
"vendor",
"cli.js",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Binary wrapper for [Flow](https://flow.org) - A static type checker for JavaScript
macOS (x64), Linux (x64, arm64) and Windows (x64) binaries are currently [provided](https://flow.org/en/docs/install/).
macOS (x64, arm64), Linux (x64, arm64) and Windows (x64) binaries are currently [provided](https://flow.org/en/docs/install/).


## CLI
Expand Down
9 changes: 8 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@
*/
var fs = require('fs');

// osx
// osx x64
process.platform = 'darwin';
process.arch = 'x64'
delete require.cache[require.resolve('./')];
fs.statSync(require('./'));

// osx arm64
process.platform = 'darwin';
process.arch = 'arm64'
delete require.cache[require.resolve('./')];
fs.statSync(require('./'));

Expand Down

0 comments on commit fa59719

Please sign in to comment.