Skip to content

More version configs for docs #10597

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 5 commits 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
2 changes: 2 additions & 0 deletions docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ params:
author: The Gitea Authors
website: https://docs.gitea.io
version: 1.11.0
minGoVersion: 1.11
goVersion: 1.13

outputs:
home:
Expand Down
11 changes: 3 additions & 8 deletions docs/content/doc/advanced/hacking-on-gitea.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,12 @@ necessary. To be able to use these you must have the `"$GOPATH"/bin` directory
on the executable path. If you don't add the go bin directory to the
executable path you will have to manage this yourself.

**Note 2**: Go version 1.11 or higher is required; however, it is important
**Note 2**: Go version {{< min-go-version >}} or higher is required; however, it is important
to note that our continuous integration will check that the formatting of the
source code is not changed by `gofmt` using `make fmt-check`. Unfortunately,
the results of `gofmt` can differ by the version of `go`. It is therefore
recommended to install the version of go that our continuous integration is
running. At the time of writing this is Go version 1.12; however, this can be
checked by looking at the
[master `.drone.yml`](https://github.com/go-gitea/gitea/blob/master/.drone.yml)
(At the time of writing
[line 67](https://github.com/go-gitea/gitea/blob/8917d66571a95f3da232a0c27bc1300210d10fde/.drone.yml#L67)
is the relevant line - but this may change.)
recommended to install the version of Go that our continuous integration is
running. As of last update, it should be Go version {{< go-version >}}.
Comment on lines -43 to +44
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to have me re-write this. I found it to be slightly confusing, though, as it said 1.12 then perma-links to a line saying 1.11, and the line for master is already off because of drone changes.


## Downloading and cloning the Gitea source code

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 @@ -31,7 +31,7 @@ necessary. To be able to use these, you must have the `"$GOPATH/bin"` directory
on the executable path. If you don't add the go bin directory to the
executable path, you will have to manage this yourself.

**Note 2**: Go version 1.11 or higher is required. However, it is recommended to
**Note 2**: Go version {{< min-go-version >}} or higher is required. However, it is recommended to
obtain the same version as our continuous integration, see the advice given in
<a href='{{< relref "doc/advanced/hacking-on-gitea.en-us.md" >}}'>Hacking on
Gitea</a>
Expand Down Expand Up @@ -81,7 +81,7 @@ git checkout v{{< version >}} # or git checkout pr-xyz

To build from source, the following programs must be present on the system:

- `go` 1.11.0 or higher, see [here](https://golang.org/dl/)
- `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/)
- `make`, see <a href='{{< relref "doc/advanced/make.en-us.md" >}}'>here</a>

Expand Down Expand Up @@ -116,7 +116,7 @@ TAGS="bindata sqlite sqlite_unlock_notify" make build

The `build` target is split into two sub-targets:

- `make backend` which requires [Go 1.11](https://golang.org/dl/) or greater.
- `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.

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 @@ -46,7 +46,7 @@ git checkout v{{< version >}}

要从源代码进行编译,以下依赖程序必须事先安装好:

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

Expand Down
1 change: 1 addition & 0 deletions docs/layouts/shortcodes/go-version.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ .Site.Params.goVersion }}
1 change: 1 addition & 0 deletions docs/layouts/shortcodes/min-go-version.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ .Site.Params.minGoVersion }}