Skip to content

Add node version variable to docs #10620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ help:
go-check:
$(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell go version | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?[[:space:]]' | tr '.' ' ');))
@if [ "$(GO_VERSION)" -lt "001011000" ]; then \
echo "Gitea requires Go 1.11.0 or greater to build. You can get it at https://golang.org/dl/"; \
echo "Gitea requires Go 1.11 or greater to build. You can get it at https://golang.org/dl/"; \
exit 1; \
fi

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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ or if sqlite support is required:
The `build` target is split into two sub-targets:

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

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

Expand Down
1 change: 1 addition & 0 deletions docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ params:
version: 1.11.0
minGoVersion: 1.11
goVersion: 1.13
minNodeVersion: 10

outputs:
home:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/doc/advanced/hacking-on-gitea.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ environment variable and to add the go bin directory or directories

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

You will also need make.
<a href='{{< relref "doc/advanced/make.en-us.md" >}}'>(See here how to get Make)</a>
Expand Down
6 changes: 3 additions & 3 deletions docs/content/doc/installation/from-source.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ environment variable and to add the go bin directory or directories

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

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

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

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion docs/content/doc/installation/from-source.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ git checkout v{{< version >}}
要从源代码进行编译,以下依赖程序必须事先安装好:

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

各种可用的 [make 任务](https://github.com/go-gitea/gitea/blob/master/Makefile)
Expand Down
1 change: 1 addition & 0 deletions docs/layouts/shortcodes/min-node-version.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ .Site.Params.minNodeVersion }}