You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* giteaofficial/main: (21 commits)
improve unit test for caching (go-gitea#26185)
Render plaintext task list items for markdown files (go-gitea#26186)
Add tooltip to describe LFS table column and color `delete LFS file` button red (go-gitea#26181)
Show branches and tags that contain a commit (go-gitea#25180)
Release attachments duplicated check (go-gitea#26176)
Calculate MAX_WORKERS default value by CPU number (go-gitea#26177)
Fixing redirection issue for logged-in users (go-gitea#26105)
Update govulncheck, fix typo (go-gitea#26168)
Fix handling of plenty Nuget package versions (go-gitea#26075)
Fix typos in Contributing.md (go-gitea#26170)
Disable download action logs button when there's no logs (go-gitea#26114)
Re-add static images to docs (go-gitea#26167)
Update email-setup.en-us.md (go-gitea#26068)
Improve display of Labels/Projects/Assignees sort options (go-gitea#25886)
Fix wrong branch name in rename branch modal (go-gitea#26146)
Doc update swagger doc for POST /orgs/{org}/teams (go-gitea#26155)
Fix UI regression of asciinema player (go-gitea#26159)
refactor improve NoBetterThan (go-gitea#26126)
Update Chinese documents (go-gitea#26139)
Fix bugs in LFS meta garbage collection (go-gitea#26122)
...
Copy file name to clipboardExpand all lines: docs/content/administration/config-cheat-sheet.en-us.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -488,7 +488,7 @@ Configuration at `[queue]` will set defaults for queues with overrides for indiv
488
488
-`CONN_STR`: **redis://127.0.0.1:6379/0**: Connection string for the redis queue type. For `redis-cluster` use `redis+cluster://127.0.0.1:6379/0`. Options can be set using query params. Similarly, LevelDB options can also be set using: **leveldb://relative/path?option=value** or **leveldb:///absolute/path?option=value**, and will override `DATADIR`
489
489
-`QUEUE_NAME`: **_queue**: The suffix for default redis and disk queue name. Individual queues will default to **`name`**`QUEUE_NAME` but can be overridden in the specific `queue.name` section.
490
490
-`SET_NAME`: **_unique**: The suffix that will be added to the default redis and disk queue `set` name for unique queues. Individual queues will default to **`name`**`QUEUE_NAME`_`SET_NAME`_ but can be overridden in the specific `queue.name` section.
491
-
-`MAX_WORKERS`: **10**: Maximum number of worker go-routines for the queue.
491
+
-`MAX_WORKERS`: **(dynamic)**: Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10.
你需要 [安装Go](https://golang.google.cn/doc/install) 并正确设置Go环境。特别的,建议设置`$GOPATH`环境变量,并将 Go 的二进制目录或目录`${GOPATH//://bin:}/bin`添加到`$PATH`中。请参阅 Go 百科上关于 [GOPATH](https://github.com/golang/go/wiki/GOPATH) 的词条。
**注意**:当执行需要外部工具的 make 任务(如`make misspell-check`)时,Gitea 将根据需要自动下载和构建这些工具。为了能够实现这个目的,你必须将`"$GOPATH/bin"`目录添加到可执行路径中。如果没有将 Go 的二进制目录添加到可执行路径中,你需要自行解决产生的问题。
25
+
26
+
**注意2**:需要 Go 版本 @minGoVersion@ 或更高版本。不过,建议获取与我们的持续集成(continuous integration, CI)相同的版本,请参阅在 [Hacking on Gitea](development/hacking-on-gitea.md) 中给出的建议。
23
27
24
28
## 下载
25
29
26
-
你需要获取Gitea的源码,最方便的方式是使用 `git` 命令。执行以下命令:
30
+
首先,我们需要获取源码。由于引入了 Go 模块,最简单的方法是直接使用 Git,因为我们不再需要在 GOPATH 内构建 Gitea。
要使用构建标签(`TAGS`)进行交叉编译Gitea,您还需要一个 C 交叉编译器,该编译器的目标架构与`GOOS`和`GOARCH`变量选择的架构相同。例如,要为 Linux ARM64(`GOOS=linux`和`GOARCH=arm64`)进行交叉编译,您需要`aarch64-unknown-linux-gnu-gcc`交叉编译器。这是因为 Gitea 构建标签使用了`cgo`的外部函数接口(FFI)。
92
136
93
-
```bash
137
+
在没有任何标签的情况下,交叉编译的 Gitea 为 Linux ARM64 版本:
138
+
139
+
```
94
140
GOOS=linux GOARCH=arm64 make build
95
141
```
96
142
97
-
交叉构建适用于 Linux ARM64 的 Gitea,并且带上 Gitea 发行版采用的编译选项:
143
+
要交叉编译 Linux ARM64 下的Gitea,这是推荐的构建标签:
98
144
99
-
```bash
145
+
```
100
146
CC=aarch64-unknown-linux-gnu-gcc GOOS=linux GOARCH=arm64 TAGS="bindata sqlite sqlite_unlock_notify" make build
101
147
```
102
148
103
-
## 使用Linux与Zig编译或交叉编译
149
+
根据您的目标架构,适当替换`CC`、`GOOS`和`GOARCH`。
150
+
151
+
有时您需要构建一个静态编译的镜像。为此,您需要添加以下内容:
152
+
153
+
```
154
+
LDFLAGS="-linkmode external -extldflags '-static' $LDFLAGS" TAGS="netgo osusergo $TAGS" make build
0 commit comments