Skip to content

Commit f5a2025

Browse files
Add node version variable to docs (#10620)
Also adjusted other version mentions so go version is always mentioned as major.minor and node only as major. Co-authored-by: silverwind <[email protected]>
1 parent 3502730 commit f5a2025

File tree

7 files changed

+10
-8
lines changed

7 files changed

+10
-8
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ help:
145145
go-check:
146146
$(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell go version | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?[[:space:]]' | tr '.' ' ');))
147147
@if [ "$(GO_VERSION)" -lt "001011000" ]; then \
148-
echo "Gitea requires Go 1.11.0 or greater to build. You can get it at https://golang.org/dl/"; \
148+
echo "Gitea requires Go 1.11 or greater to build. You can get it at https://golang.org/dl/"; \
149149
exit 1; \
150150
fi
151151

@@ -161,7 +161,7 @@ node-check:
161161
$(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?' | tr '.' ' ');))
162162
$(eval NPM_MISSING := $(shell hash npm > /dev/null 2>&1 || echo 1))
163163
@if [ "$(NODE_VERSION)" -lt "010000000" -o "$(NPM_MISSING)" = "1" ]; then \
164-
echo "Gitea requires Node.js 10.0.0 or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
164+
echo "Gitea requires Node.js 10 or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
165165
exit 1; \
166166
fi
167167

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ or if sqlite support is required:
4040
The `build` target is split into two sub-targets:
4141

4242
- `make backend` which requires [Go 1.11](https://golang.org/dl/) or greater.
43-
- `make frontend` which requires [Node.js 10.0.0](https://nodejs.org/en/download/) or greater.
43+
- `make frontend` which requires [Node.js 10](https://nodejs.org/en/download/) or greater.
4444

4545
If pre-built frontend files are present it is possible to only build the backend:
4646

docs/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ params:
2121
version: 1.11.0
2222
minGoVersion: 1.11
2323
goVersion: 1.13
24+
minNodeVersion: 10
2425

2526
outputs:
2627
home:

docs/content/doc/advanced/hacking-on-gitea.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ environment variable and to add the go bin directory or directories
2525

2626
Next, [install Node.js with npm](https://nodejs.org/en/download/) which is
2727
required to build the JavaScript and CSS files. The minimum supported Node.js
28-
version is 10 and the latest LTS version is recommended.
28+
version is {{< min-node-version >}} and the latest LTS version is recommended.
2929

3030
You will also need make.
3131
<a href='{{< relref "doc/advanced/make.en-us.md" >}}'>(See here how to get Make)</a>

docs/content/doc/installation/from-source.en-us.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ environment variable and to add the go bin directory or directories
2323

2424
Next, [install Node.js with npm](https://nodejs.org/en/download/) which is
2525
required to build the JavaScript and CSS files. The minimum supported Node.js
26-
version is 10 and the latest LTS version is recommended.
26+
version is {{< min-node-version >}} and the latest LTS version is recommended.
2727

2828
**Note**: When executing make tasks that require external tools, like
2929
`make misspell-check`, Gitea will automatically download and build these as
@@ -82,7 +82,7 @@ git checkout v{{< version >}} # or git checkout pr-xyz
8282
To build from source, the following programs must be present on the system:
8383

8484
- `go` {{< min-go-version >}} or higher, see [here](https://golang.org/dl/)
85-
- `node` 10.0.0 or higher with `npm`, see [here](https://nodejs.org/en/download/)
85+
- `node` {{< min-node-version >}} or higher with `npm`, see [here](https://nodejs.org/en/download/)
8686
- `make`, see <a href='{{< relref "doc/advanced/make.en-us.md" >}}'>here</a>
8787

8888
Various [make tasks](https://github.com/go-gitea/gitea/blob/master/Makefile)
@@ -117,7 +117,7 @@ TAGS="bindata sqlite sqlite_unlock_notify" make build
117117
The `build` target is split into two sub-targets:
118118

119119
- `make backend` which requires [Go {{< min-go-version >}}](https://golang.org/dl/) or greater.
120-
- `make frontend` which requires [Node.js 10.0.0](https://nodejs.org/en/download/) or greater.
120+
- `make frontend` which requires [Node.js {{< min-node-version >}}](https://nodejs.org/en/download/) or greater.
121121

122122
If pre-built frontend files are present it is possible to only build the backend:
123123

docs/content/doc/installation/from-source.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ git checkout v{{< version >}}
4747
要从源代码进行编译,以下依赖程序必须事先安装好:
4848

4949
- `go` {{< min-go-version >}} 或以上版本, 详见 [here](https://golang.org/dl/)
50-
- `node` 10.0.0 或以上版本,并且安装 `npm`, 详见 [here](https://nodejs.org/en/download/)
50+
- `node` {{< min-node-version >}} 或以上版本,并且安装 `npm`, 详见 [here](https://nodejs.org/en/download/)
5151
- `make`, 详见 <a href='{{< relref "make.zh-cn.md" >}}'>这里</a>
5252

5353
各种可用的 [make 任务](https://github.com/go-gitea/gitea/blob/master/Makefile)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{ .Site.Params.minNodeVersion }}

0 commit comments

Comments
 (0)