Skip to content

Commit

Permalink
build: fix npm version detection
Browse files Browse the repository at this point in the history
Npm's package.json now contains two fields named "version".
Grep for the top-level one.

Fixes: nodejs/build#2850

PR-URL: nodejs#41575
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Vladimir de Turckheim <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Zijian Liu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Christian Clauss <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
targos committed Jan 18, 2022
1 parent c4f5a49 commit 331b906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]')
ifeq ($(findstring os/390,$PLATFORM),os/390)
PLATFORM ?= os390
endif
NPMVERSION=v$(shell cat deps/npm/package.json | grep '"version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/')
NPMVERSION=v$(shell cat deps/npm/package.json | grep '^ "version"' | sed 's/^[^:]*: "\([^"]*\)",.*/\1/')

UNAME_M=$(shell uname -m)
ifeq ($(findstring x86_64,$(UNAME_M)),x86_64)
Expand Down

0 comments on commit 331b906

Please sign in to comment.