Compare commits

..

4 Commits

Author SHA1 Message Date
HesterG
d2c9fb02dd
Unify doc links to use paths relative to doc folder (#24979) (#25000)
Backport #24979 

Changes:

1. Use uniform links types relative to doc folder (start with `doc/`)
2. According to [docusaurus
links](https://docusaurus.io/docs/markdown-features/links), if `<a>` is
used, the `href` is resolved as URL location, but not file location. So
need to use `[text]({{< relref "path" >}})` instead.
2023-05-30 18:08:32 +08:00
HesterG
cdeb55f6e5
Remove unnecessary content on docs (#24976) (#25001)
Backport #24976
2023-05-30 17:21:03 +08:00
Giteabot
0ef7b66018
Update from-binary.en-us.md (#24975) (#24999)
Backport #24975 by @team-epk

Fixed link to the creating a systemd service in Ubuntu document.
2023-05-30 14:01:06 +08:00
sillyguodong
826b7b979c
Fix missing reference prefix of commits when sync mirror repository (#24994)
replace #24868
just a patch to fix #24824 in v1.19.4
The reference name of commits when synchronizing should also has prefix
like refs/heads/<branch-name>.
2023-05-30 13:12:21 +08:00
16 changed files with 113 additions and 43 deletions

View File

@ -121,9 +121,8 @@ to the Gitea sources. Otherwise, changes can't be pushed.
## Building Gitea (Basic)
Take a look at our
<a href='{{< relref "doc/installation/from-source.en-us.md" >}}'>instructions</a>
for <a href='{{< relref "doc/installation/from-source.en-us.md" >}}'>building
from source</a>.
[instructions]({{< relref "doc/installation/from-source.en-us.md" >}})
for [building from source]({{< relref "doc/installation/from-source.en-us.md" >}}).
The simplest recommended way to build from source is:
@ -264,7 +263,7 @@ OpenAPI 3 documentation.
When creating new configuration options, it is not enough to add them to the
`modules/setting` files. You should add information to `custom/conf/app.ini`
and to the
<a href='{{< relref "doc/administration/config-cheat-sheet.en-us.md" >}}'>configuration cheat sheet</a>
[configuration cheat sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md" >}})
found in `docs/content/doc/administer/config-cheat-sheet.en-us.md`
### Changing the logo

View File

@ -113,8 +113,8 @@ git fetch --all --prune
## 构建 Gitea基本
看看我们的
<a href='{{ < relref "doc/installation/from-source.en-us.md" > }}'>说明</a>
关于如何 <a href='{{ < relref "doc/installation/from-source.en-us.md" > }}'>从源代码构建</a>
[说明]({{< relref "doc/installation/from-source.zh-cn.md" >}})
关于如何[从源代码构建]({{< relref "doc/installation/from-source.zh-cn.md" >}})
从源代码构建的最简单推荐方法是:
@ -247,7 +247,7 @@ make swagger-check
### 创建新的配置选项
创建新的配置选项时,将它们添加到 `modules/setting` 的对应文件。您应该将信息添加到 `custom/conf/app.ini`
并到 <a href = '{{ < relref "doc/administration/config-cheat-sheet.en-us.md" > }}'>配置备忘单</a>
并到[配置备忘单]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md" >}})
`docs/content/doc/advanced/config-cheat-sheet.en-us.md` 中找到
### 更改Logo

View File

@ -145,7 +145,7 @@ After you complete the above steps, you can run Gitea two ways:
### 1. Creating a service file to start Gitea automatically (recommended)
See how to create [Linux service]({{< relref "run-as-service-in-ubuntu.en-us.md" >}})
See how to create [Linux service]({{< relref "doc/installation/run-as-service-in-ubuntu.en-us.md" >}})
### 2. Running from command-line/terminal
@ -186,7 +186,7 @@ Older Linux distributions (such as Debian 7 and CentOS 6) may not be able to loa
Gitea binary, usually producing an error such as `./gitea: /lib/x86_64-linux-gnu/libc.so.6:
version 'GLIBC\_2.14' not found (required by ./gitea)`. This is due to the integrated
SQLite support in the binaries provided by dl.gitea.com. In this situation, it is usually
possible to [install from source]({{< relref "from-source.en-us.md" >}}), without including
possible to [install from source]({{< relref "doc/installation/from-source.en-us.md" >}}), without including
SQLite support.
### Running Gitea on another port

View File

@ -34,7 +34,7 @@ Après avoir suivi les étapes ci-dessus, vous aurez un binaire `gitea` dans vot
### Anciennes version de glibc
Les anciennes distributions Linux (comme Debian 7 ou CentOS 6) peuvent ne pas être capable d'exécuter le binaire Gitea, résultant généralement une erreur du type ```./gitea: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./gitea)```. Cette erreur est due au driver SQLite que nous intégrons dans le binaire Gitea. Dans le futur, nous fournirons des binaires sans la dépendance pour la bibliothèque glibc. En attendant, vous pouvez mettre à jour votre distribution ou installer Gitea depuis le [code source]({{< relref "from-source.fr-fr.md" >}}).
Les anciennes distributions Linux (comme Debian 7 ou CentOS 6) peuvent ne pas être capable d'exécuter le binaire Gitea, résultant généralement une erreur du type ```./gitea: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./gitea)```. Cette erreur est due au driver SQLite que nous intégrons dans le binaire Gitea. Dans le futur, nous fournirons des binaires sans la dépendance pour la bibliothèque glibc. En attendant, vous pouvez mettre à jour votre distribution ou installer Gitea depuis le [code source]({{< relref "doc/installation/from-source.fr-fr.md" >}}).
### Exécuter Gitea avec un autre port

View File

@ -129,7 +129,7 @@ cp gitea /usr/local/bin/gitea
### 1. 创建服务自动启动 Gitea推荐
学习创建 [Linux 服务]({{< relref "run-as-service-in-ubuntu.zh-cn.md" >}})
学习创建 [Linux 服务]({{< relref "doc/installation/run-as-service-in-ubuntu.zh-cn.md" >}})
### 2. 通过命令行终端运行
@ -161,4 +161,4 @@ GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
> 更多经验总结,请参考英文版 [Troubleshooting](/en-us/install-from-binary/#troubleshooting)
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}})
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "doc/help/seek-help.zh-cn.md" >}})

View File

@ -72,12 +72,12 @@ There is a [Gitea](https://chocolatey.org/packages/gitea) package for Windows by
choco install gitea
```
Or follow the [deployment from binary]({{< relref "from-binary.en-us.md" >}}) guide.
Or follow the [deployment from binary]({{< relref "doc/installation/from-binary.en-us.md" >}}) guide.
## macOS
Currently, the only supported method of installation on MacOS is [Homebrew](http://brew.sh/).
Following the [deployment from binary]({{< relref "from-binary.en-us.md" >}}) guide may work,
Following the [deployment from binary]({{< relref "doc/installation/from-binary.en-us.md" >}}) guide may work,
but is not supported. To install Gitea via `brew`:
```

View File

@ -17,15 +17,15 @@ menu:
## Linux
Nous n'avons pas encore publié de paquet pour Linux, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets pour toutes distributions Linux. En attendant, vous devriez suivre les [instructions d'installation]({{< relref "from-binary.fr-fr.md" >}}) avec le binaire pré-compilé.
Nous n'avons pas encore publié de paquet pour Linux, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets pour toutes distributions Linux. En attendant, vous devriez suivre les [instructions d'installation]({{< relref "doc/installation/from-binary.fr-fr.md" >}}) avec le binaire pré-compilé.
## Windows
Nous n'avons pas encore publié de paquet pour Windows, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets sous la forme de fichiers `MSI` ou via [Chocolatey](https://chocolatey.org/). En attendant, vous devriez suivre les [instructions d'installation]({{< relref "from-binary.fr-fr.md" >}}) avec le binaire pré-compilé.
Nous n'avons pas encore publié de paquet pour Windows, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets sous la forme de fichiers `MSI` ou via [Chocolatey](https://chocolatey.org/). En attendant, vous devriez suivre les [instructions d'installation]({{< relref "doc/installation/from-binary.fr-fr.md" >}}) avec le binaire pré-compilé.
## macOS
Actuellement, nous ne supportons que l'installation via `brew` pour macOS. Si vous n'utilisez pas [Homebrew](http://brew.sh/), vous pouvez suivre les [instructions d'installation]({{< relref "from-binary.fr-fr.md" >}}) avec le binaire pré-compilé. Pour installer Gitea depuis `brew`, utilisez les commandes suivantes :
Actuellement, nous ne supportons que l'installation via `brew` pour macOS. Si vous n'utilisez pas [Homebrew](http://brew.sh/), vous pouvez suivre les [instructions d'installation]({{< relref "doc/installation/from-binary.fr-fr.md" >}}) avec le binaire pré-compilé. Pour installer Gitea depuis `brew`, utilisez les commandes suivantes :
```
brew tap go-gitea/gitea

View File

@ -64,11 +64,11 @@ OpenSUSE 构建服务为 [openSUSE 和 SLE](https://software.opensuse.org/downlo
choco install gitea
```
你也可以 [从二进制安装]({{< relref "from-binary.zh-cn.md" >}}) 。
你也可以 [从二进制安装]({{< relref "doc/installation/from-binary.zh-cn.md" >}}) 。
## macOS
macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装]({{< relref "from-binary.zh-cn.md" >}})。在你安装了 `brew` 之后, 你可以执行以下命令:
macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装]({{< relref "doc/installation/from-binary.zh-cn.md" >}})。在你安装了 `brew` 之后, 你可以执行以下命令:
```
brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea
@ -102,7 +102,3 @@ make install clean
如果这里没有找到你喜欢的包管理器,可以使用 Gitea 第三方软件包。这里有一个完整的列表: [awesome-gitea](https://gitea.com/gitea/awesome-gitea/src/branch/master/README.md#user-content-packages)。
如果你知道其他 Gitea 第三方软件包,请发送 PR 来添加它。
## 需要帮助?
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}})

View File

@ -17,7 +17,7 @@ menu:
## Linux
目前尚未發佈任何 Linux 套件,如果我們發佈了,會直接更新此網頁。在這之前請先參考[執行檔安裝]({{< relref "from-binary.zh-tw.md" >}})方式。
目前尚未發佈任何 Linux 套件,如果我們發佈了,會直接更新此網頁。在這之前請先參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。
## Windows
@ -27,11 +27,11 @@ menu:
choco install gitea
```
也可以參考[執行檔安裝]({{< relref "from-binary.zh-tw.md" >}})方式。
也可以參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。
## macOS
目前我們只支援透過 `brew` 來安裝套件。假如您尚未使用 [Homebrew](http://brew.sh/),您就必須參考[執行檔安裝]({{< relref "from-binary.zh-tw.md" >}})方式。透過 `brew` 安裝 Gitea您只需要執行底下指令:
目前我們只支援透過 `brew` 來安裝套件。假如您尚未使用 [Homebrew](http://brew.sh/),您就必須參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。透過 `brew` 安裝 Gitea您只需要執行底下指令:
```
brew tap go-gitea/gitea

View File

@ -33,8 +33,7 @@ executable path, you will have to manage this yourself.
**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/development/hacking-on-gitea.en-us.md" >}}'>Hacking on
Gitea</a>
[Hacking on Gitea]({{< relref "doc/development/hacking-on-gitea.en-us.md" >}})
**Table of Contents**

View File

@ -101,7 +101,3 @@ GOOS=linux GOARCH=arm64 make build
```bash
CC=aarch64-unknown-linux-gnu-gcc GOOS=linux GOARCH=arm64 TAGS="bindata sqlite sqlite_unlock_notify" make build
```
## 需要帮助?
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}})

View File

@ -299,6 +299,6 @@ You can try it out using [the online demo](https://try.gitea.io/).
- [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3)
- [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb)
## Software and Service Support
## Integrated support
- [Drone](https://github.com/drone/drone) (CI)
Please visit [AWESOME GITEA] (https://gitea.com/gitea/awesome-gitea/) to get more third-party integrated support

View File

@ -64,10 +64,6 @@ Gitea的首要目标是创建一个极易安装运行非常快速安装和
- [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3)
- [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb)
## 软件及服务支持
## 集成支持
- [Drone](https://github.com/drone/drone) (CI)
## 需要帮助?
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}})
请访问 [Awesome Gitea](https://gitea.com/gitea/awesome-gitea/) 获得更多的第三方集成支持

View File

@ -282,6 +282,6 @@ Gitea 是從 [Gogs](http://gogs.io) Fork 出來的,請閱讀部落格文章 [G
- [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3)
- [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb)
## 軟體和服務支援
## 集成支持
- [Drone](https://github.com/drone/drone) (CI)
請訪問 [Awesome Gitea](https://gitea.com/gitea/awesome-gitea/) 獲得更多的第三方集成支持

View File

@ -143,7 +143,7 @@ func parseRemoteUpdateOutput(output string) []*mirrorSyncResult {
continue
}
results = append(results, &mirrorSyncResult{
refName: refName,
refName: git.BranchPrefix + refName, // the reference name of commits should also has prefix.
oldCommitID: shas[0],
newCommitID: shas[1],
})

View File

@ -0,0 +1,84 @@
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package mirror
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func TestParseRemoteUpdateOutput(t *testing.T) {
tests := []struct {
input string
results []*mirrorSyncResult
}{
{
// create tag
input: "From https://xxx.com/xxx/xxx\n * [new tag] v1.4 -> v1.4\n",
results: []*mirrorSyncResult{
{
refName: "refs/tags/v1.4",
oldCommitID: gitShortEmptySha,
newCommitID: "",
},
},
},
{
// delete tag and create branch
input: "From https://xxx.com/xxx/xxx\n - [deleted] (none) -> v1.0.1\n * [new branch] test/t3 -> test/t3\n * [new branch] test/t4 -> test/t4\n",
results: []*mirrorSyncResult{
{
refName: "v1.0.1",
oldCommitID: "",
newCommitID: gitShortEmptySha,
},
{
refName: "refs/heads/test/t3",
oldCommitID: gitShortEmptySha,
newCommitID: "",
},
{
refName: "refs/heads/test/t4",
oldCommitID: gitShortEmptySha,
newCommitID: "",
},
},
},
{
// delete branch
input: "From https://xxx.com/xxx/xxx\n - [deleted] (none) -> test/t2\n",
results: []*mirrorSyncResult{
{
refName: "test/t2",
oldCommitID: "",
newCommitID: gitShortEmptySha,
},
},
},
{
// new commits
input: "From https://xxx.com/xxx/xxx\n aeb77a8..425ec44 test/t3 -> test/t3\n 93b2801..3e1d4c2 test/t4 -> test/t4\n",
results: []*mirrorSyncResult{
{
refName: "refs/heads/test/t3",
oldCommitID: "aeb77a8",
newCommitID: "425ec44",
},
{
refName: "refs/heads/test/t4",
oldCommitID: "93b2801",
newCommitID: "3e1d4c2",
},
},
},
}
for _, test := range tests {
t.Run(test.input, func(t *testing.T) {
results := parseRemoteUpdateOutput(test.input)
assert.EqualValues(t, test.results, results, fmt.Sprintf("%#v", results))
})
}
}