Conversation
| "src/node-constants.cc", | ||
| "src/settings.cc", | ||
| ], | ||
| "cflags": [ '-DLLNODE_VERSION=<!(grep -Po \'"version": \K(".*")\' <(module_root_dir)/package.json)' ], |
There was a problem hiding this comment.
Will the new feature support in Mac OS system? As far as I know, option P is not supported in grep in Mac OS, neither as \K
There was a problem hiding this comment.
This is a compile-time step, so technically the feature would support any OS once we have a built artifact, but you're right that this wouldn't build on MacOS. We can change this line to:
"cflags": [ '-DLLNODE_VERSION=<!(grep \\"version\\" <(module_root_dir)/package.json | sed \'s/.*\\("[0-9\\.]*"\\).*/\\1/g\')' ],
if that works on Mac? Although I guess that also brings up the issue of Windows...
There was a problem hiding this comment.
Yes. I confirm that it should work on Mac. and I think the double \ in \\"version\\" can be replaced by single \.
In particular, I tried grep "version" < package.json | sed 's/.*\("[0-9\.]*"\).*/\1/g' and echo "$(grep \"version\" < package.json | sed 's/.*\("[0-9\.]*"\).*/\1/g')"in cli.
|
Tagging @danielleadams for visibility 😄 |
Fixes: #194