Skip to content

Commit

Permalink
include linux arm64 build
Browse files Browse the repository at this point in the history
new in v0.147.0
  • Loading branch information
mroch committed Mar 18, 2021
1 parent 3af29ea commit 5ead9df
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ VERSION ?= $(shell node -p 'require("./package.json").version')
FLOW_VERSION := $(patsubst v%,%,$(VERSION))
FLOW_BINS = \
flow-linux64-v$(FLOW_VERSION)/flow \
flow-linux-arm64-v$(FLOW_VERSION)/flow \
flow-osx-v$(FLOW_VERSION)/flow \
flow-win64-v$(FLOW_VERSION)/flow.exe

Expand Down Expand Up @@ -55,6 +56,9 @@ get-flow = \
flow-linux64-v%/flow:
$(get-flow)

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

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

Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ module.exports =
? path.join(__dirname, 'flow-osx-v' + VERSION, 'flow') :
process.platform === 'linux' && process.arch === 'x64'
? path.join(__dirname, 'flow-linux64-v' + VERSION, 'flow') :
process.platform === 'linux' && process.arch === 'arm64'
? path.join(__dirname, 'flow-linux-arm64-v' + VERSION, 'flow') :
process.platform === 'win32' && process.arch === 'x64'
? path.join(__dirname, 'flow-win64-v' + VERSION, 'flow.exe') :
null;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"files": [
"flow-linux64-v*/flow",
"flow-linux-arm64-v*/flow",
"flow-osx-v*/flow",
"flow-win64-v*/flow.exe",
"vendor",
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](http://flowtype.org) - A static type checker for JavaScript
OS X, Linux (64-bit) and Windows binaries are currently [provided](https://flow.org/en/docs/install/).
macOS (x64), Linux (x64, arm64) and Windows (x64) binaries are currently [provided](https://flow.org/en/docs/install/).


## CLI
Expand Down
8 changes: 7 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ process.platform = 'darwin';
delete require.cache[require.resolve('./')];
fs.statSync(require('./'));

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

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

// windows
process.platform = 'win32';
process.arch = 'x64'
Expand Down

0 comments on commit 5ead9df

Please sign in to comment.