summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKyle D <kdumontnu@gmail.com>2021-04-21 02:15:18 -0400
committerGitHub <noreply@github.com>2021-04-21 14:15:18 +0800
commit9b8ffa1c7a886e3b550c64799463a5d4f965a2f7 (patch)
tree519e1bfa91a58ddf006f3e6072fdf639c4c8b08e /Makefile
parentd85a4e8cec4a5e4711a2899b5a3382bd82bafb8a (diff)
downloadgitea-9b8ffa1c7a886e3b550c64799463a5d4f965a2f7.tar.gz
gitea-9b8ffa1c7a886e3b550c64799463a5d4f965a2f7.zip
Output node min version variable (#15562)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2cd3d383be..1a6197527a 100644
--- a/Makefile
+++ b/Makefile
@@ -210,9 +210,10 @@ git-check:
.PHONY: node-check
node-check:
$(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | cut -c2- | tr '.' ' ');))
+ $(eval MIN_NODE_VER_FMT := $(shell printf "%g.%g.%g" $(shell echo $(MIN_NODE_VERSION) | grep -o ...)))
$(eval NPM_MISSING := $(shell hash npm > /dev/null 2>&1 || echo 1))
@if [ "$(NODE_VERSION)" -lt "$(MIN_NODE_VERSION)" -o "$(NPM_MISSING)" = "1" ]; then \
- echo "Gitea requires Node.js 10 or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
+ echo "Gitea requires Node.js $(MIN_NODE_VER_FMT) or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
exit 1; \
fi