Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 21f3295

Browse filesBrowse files
RaisinTendanielleadams
authored andcommitted
build: refactor Makefile
* add character classes * replace echo -n with printf Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #36759 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 54bd4ab commit 21f3295
Copy full SHA for 21f3295

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FLAKY_TESTS ?= run
99
TEST_CI_ARGS ?=
1010
STAGINGSERVER ?= node-www
1111
LOGLEVEL ?= silent
12-
OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]')
12+
OSTYPE := $(shell uname -s | tr '[:upper:]' '[:lower:]')
1313
COVTESTS ?= test-cov
1414
COV_SKIP_TESTS ?= core_line_numbers.js,testFinalizer.js,test_function/test.js
1515
GTEST_FILTER ?= "*"
@@ -40,7 +40,7 @@ ifeq ($(OSTYPE), darwin)
4040
GCOV = xcrun llvm-cov gcov
4141
endif
4242

43-
BUILDTYPE_LOWER := $(shell echo $(BUILDTYPE) | tr '[A-Z]' '[a-z]')
43+
BUILDTYPE_LOWER := $(shell echo $(BUILDTYPE) | tr '[:upper:]' '[:lower:]')
4444

4545
# Determine EXEEXT
4646
EXEEXT := $(shell $(PYTHON) -c \
@@ -85,7 +85,7 @@ endif
8585
# To add a target to the help, add a double comment (##) on the target line.
8686
help: ## Print help for targets with comments.
8787
@printf "For more targets and info see the comments in the Makefile.\n\n"
88-
@grep -E '^[a-zA-Z0-9._-]+:.*?## .*$$' Makefile | sort | \
88+
@grep -E '^[[:alnum:]._-]+:.*?## .*$$' Makefile | sort | \
8989
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
9090

9191
# The .PHONY is needed to ensure that we recursively use the out/Makefile
@@ -243,10 +243,10 @@ coverage-test: coverage-build
243243
--gcov-exclude='.*\b(deps|usr|out|cctest|embedding)\b' -v \
244244
-r Release/obj.target --html --html-detail -o ../coverage/cxxcoverage.html \
245245
--gcov-executable="$(GCOV)")
246-
@echo -n "Javascript coverage %: "
246+
@printf "Javascript coverage %%: "
247247
@grep -B1 Lines coverage/index.html | head -n1 \
248248
| sed 's/<[^>]*>//g'| sed 's/ //g'
249-
@echo -n "C++ coverage %: "
249+
@printf "C++ coverage %%: "
250250
@grep -A3 Lines coverage/cxxcoverage.html | grep style \
251251
| sed 's/<[^>]*>//g'| sed 's/ //g'
252252

@@ -1360,7 +1360,7 @@ lint: ## Run JS, C++, MD and doc linters.
13601360
$(MAKE) lint-addon-docs || EXIT_STATUS=$$? ; \
13611361
$(MAKE) lint-md || EXIT_STATUS=$$? ; \
13621362
exit $$EXIT_STATUS
1363-
CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+
1363+
CONFLICT_RE=^>>>>>>> [[:xdigit:]]+|^<<<<<<< [[:alpha:]]+
13641364

13651365
# Related CI job: node-test-linter
13661366
lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.