[ci skip]Add CONTRIBUTING.md
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
|
||||
<h4>Luminol is a folia fork with many useful optimizations, configurable vanilla features, and more API supports, and it was designed for survival and anarchy servers</h4>
|
||||
|
||||
**English** | [中文](./README_CN.md)
|
||||
|
||||
[](LICENSE)
|
||||
[](https://github.com/LuminolMC/Luminol/issues)
|
||||

|
||||

|
||||

|
||||
|
||||
**English** | [中文](./README_CN.md)
|
||||
|
||||
## Features
|
||||
- Configurable vanilla features
|
||||
- Tpsbar support
|
||||
@@ -20,7 +20,7 @@
|
||||
- More API support for plugin development (W.I.P)
|
||||
|
||||
## Download
|
||||
Any versions are available in the [release](https://github.com/LuminolMC/Luminol/releases), also you can build it by yourself through the following steps.
|
||||
Any versions are available in the [release](https://github.com/LuminolMC/Luminol/releases), also you can build it by yourself through [the following steps](./README.md#Build).
|
||||
|
||||
## Build
|
||||
To build a paperclip jar, you need to run the following command. You can find the jar in build/libs(Note: JDK17 is needed)
|
||||
@@ -54,6 +54,9 @@ QQ Group: 368632360
|
||||
## About Issue
|
||||
When you meet any problems, just ask us, we will do our best to solve it, but remember to state your problem clear and provide enough logs etc.</br>
|
||||
|
||||
## Pull Requests
|
||||
See [Contributing](./docs/CONTRIBUTING.md)
|
||||
|
||||
## BStats
|
||||

|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
|
||||
<h4>Luminol 是一个基于folia的分支,具有许多有用的优化、可配置的原版特性和更多的API支持,它专为生存和无政府服务器设计</h4>
|
||||
|
||||
[English](./README.md) | **中文**
|
||||
|
||||
[](LICENSE)
|
||||
[](https://github.com/LuminolMC/Luminol/issues)
|
||||

|
||||

|
||||

|
||||
|
||||
[English](./README.md) | **中文**
|
||||
|
||||
## 特性
|
||||
- 可配置的原版特性
|
||||
- Tpsbar 支持
|
||||
@@ -20,7 +20,7 @@
|
||||
- 更多的插件开发API支持(进行中)
|
||||
|
||||
## 下载
|
||||
任何版本都可以在 [release](https://github.com/LuminolMC/Luminol/releases), 中找到,您也可以通过以下步骤自己构建。
|
||||
任何版本都可以在 [release](https://github.com/LuminolMC/Luminol/releases), 中找到,您也可以通过[以下步骤](./README_CN.md#构建)自己构建。
|
||||
|
||||
## 构建
|
||||
要构建一个paperclip jar,你需要运行以下命令。你可以在build/libs中找到jar(注意:需要JDK17)
|
||||
@@ -51,5 +51,8 @@ QQ群:368632360
|
||||
## 关于 Issue
|
||||
当您遇到任何问题时,请向我们提问,我们将尽力解决,但请记得清楚地描述您的问题并提供足够的日志等信息。
|
||||
|
||||
## 贡献代码
|
||||
可查看 [Contributing](./docs/CONTRIBUTING_cn.md)
|
||||
|
||||
## BStats
|
||||

|
||||
70
docs/CONTRIBUTING.md
Normal file
70
docs/CONTRIBUTING.md
Normal file
@@ -0,0 +1,70 @@
|
||||
Contributing to Luminol
|
||||
===========
|
||||
|
||||
**English** | [中文](./CONTRIBUTING_cn.md)
|
||||
|
||||
We're glad that you want to contribute to our project!
|
||||
In general, our review of pull requests is very lenient.
|
||||
And if you can follow the rules below, we can complete the review faster.
|
||||
|
||||
## Please fork using your personal account
|
||||
|
||||
We regularly merge existing PRs.
|
||||
If there're some small problems, we'll help you solve them by editing your PR.
|
||||
|
||||
But, if your PR is from a organization, we can NOT edit your PR, so we must merge your PR manually.
|
||||
|
||||
So, don't use orgnization accounts for fork!
|
||||
|
||||
See also [This issue](https://github.com/isaacs/github/issues/1681), and then you'll know why we can't edit PRs from organizations.
|
||||
|
||||
## Development Environment
|
||||
|
||||
Before coding, you need these softwares / tools as Dev Environment.
|
||||
|
||||
- `git`
|
||||
- `JDK 17 or higher`
|
||||
|
||||
## Understanding "Patches"
|
||||
|
||||
Luminol uses as the same patching system as Paper,
|
||||
and has been divided into two directories for the purpose of modifying different parts of it:
|
||||
|
||||
- `luminol-api` - Modifications to `Folia-API` / `Paper-API` / `Spigot-API` / `Bukkit`.
|
||||
|
||||
The patching system is based on git, and you can learn about it at here: <https://git-scm.com/docs/gittutorial>
|
||||
|
||||
If you have forked the main repository, then you should follow the steps below:
|
||||
|
||||
1. Clone your repository to local
|
||||
2. Run Gradle's `applyPatches` task in your IDE or terminal (You can run `./gradlew applyPatches` directly in terminal.)
|
||||
3. Enter `luminol-api` or `luminol-server` directory to carry out modifications.
|
||||
|
||||
BTW, `luminol-api` and `luminol-server` are not normal git repositories.
|
||||
|
||||
- Before applying patches, the base will point to unmodified source code.
|
||||
- Every commit after the base is a patch.
|
||||
- Only commits after the last commit of Paper will be considered Luminol' patches.
|
||||
|
||||
## Adding new patches
|
||||
|
||||
It's very easy to to add patches by following the steps below:
|
||||
|
||||
1. Modify the code of `luminol-api` and / or `luminol-server`
|
||||
2. Add these changes to the local git repository (For example, `git add .`)
|
||||
3. Commit these changes using `git commit -m <Commit Message>`
|
||||
4. Run Gradle's task `rebuildPatches` to convert your commits to a new patch
|
||||
5. Push your patches to your repository
|
||||
|
||||
After pushing, you can open a PR to submit your patches.
|
||||
|
||||
## Modifying patches
|
||||
|
||||
You can modify a existing patch by following the steps below:
|
||||
|
||||
1. Modify code at HEAD
|
||||
2. Run `git commit -a --fixup <hash>` in your terminal to make a fix-up commit
|
||||
- If you want to edit the commit message, replace `--fixup` with `--squash`.
|
||||
3. Run `git rebase -i --autosquash base` to rebase automatically, then just type `:q` to close the confirm page
|
||||
4. Run Gradle's task `rebuildPatches` to modify existing patches
|
||||
5. Push and PR again
|
||||
67
docs/CONTRIBUTING_cn.md
Normal file
67
docs/CONTRIBUTING_cn.md
Normal file
@@ -0,0 +1,67 @@
|
||||
为Luminol贡献代码
|
||||
===========
|
||||
|
||||
[English](./CONTRIBUTING.md) | **中文**
|
||||
|
||||
我们很开心您想为我们的项目做出贡献!一般来说,我们对PR的审核是十分宽松的;
|
||||
但是如果您可以遵守下列的规则,我们可以更快地完成审核。
|
||||
|
||||
## 使用个人账户进行 Fork
|
||||
|
||||
我们会定期尝试合并已有的 PR,如果有一些小问题,会尝试帮您解决这些问题。
|
||||
|
||||
但是如果您使用了组织账号进行 PR,我们就不能对您的 PR 进行修改了。因此我们只能关闭你的PR然后进行手动合并。
|
||||
|
||||
所以,请不要使用组织账号进行 Fork!
|
||||
|
||||
您可以看看 [这个 Issue](https://github.com/isaacs/github/issues/1681) 来了解一下我们为什么无法修改组织账号的 PR。
|
||||
|
||||
## 开发环境
|
||||
|
||||
在开始开发之前,您首先需要拥有以下软件作为开发环境:
|
||||
|
||||
- `git`
|
||||
- `JDK 17 或更高版本`
|
||||
|
||||
## 了解补丁(Patches)
|
||||
|
||||
Luminol 使用和 Folia 一样的补丁系统,并为了针对不同部分的修改分成了两个目录:
|
||||
|
||||
- `luminol-api` - 对 `Folia-API` / `Paper-API` / `Spigot-API` / `Bukkit` 进行的修改。
|
||||
|
||||
补丁系统是基于 git 的,你可以在这里了解 git 的基本内容: <https://git-scm.com/docs/gittutorial>
|
||||
|
||||
如果你已经 Fork 了主储存库,那么下面你应该这么做:
|
||||
|
||||
1. 将你的仓库 clone 到本地;
|
||||
2. 在你的 IDE 或 终端 内执行 Gradle 的 `applyPatches` 任务,如果是在终端内,你可以执行 `./gradlew applyPatches`;
|
||||
3. 进入 `luminol-api` 或 `luminol-server` 文件夹进行修改。
|
||||
|
||||
顺便一提,`luminol-api` 和 `luminol-server` 并不是正常的 git 仓库:
|
||||
|
||||
- 在应用补丁前,基点将会指向未被更改的源码
|
||||
- 在基点后的每一个提交都是一个补丁
|
||||
- 只有在 Folia 最后一个提交后的提交才会被视为 luminol 补丁
|
||||
|
||||
## 增加补丁
|
||||
|
||||
按照以下步骤增加一个补丁是非常简单的:
|
||||
|
||||
1. 对 `luminol-api` 或者 / 和 `luminol-server` 进行修改;
|
||||
2. 使用 git 添加你的修改,比如 `git add .`;
|
||||
3. 使用 `git commit -m <提交信息>` 进行提交;
|
||||
4. 运行 Gradle 任务 `rebuildPatches` 将你的提交转化为一个补丁;
|
||||
5. 将你生成的补丁文件进行推送。
|
||||
|
||||
这样做以后,你就可以将你的补丁文件进行 PR 提交。
|
||||
|
||||
## 修改补丁
|
||||
|
||||
你可以使用以下方法来修改一个补丁的内容:
|
||||
|
||||
1. 在 HEAD 上直接进行修改;
|
||||
2. 使用 `git commit -a --fixup <hash>` 来进行一个更正提交;
|
||||
- 如果你想要更改提交信息,你也可以用 `--squash` 来代替 `--fixup`。
|
||||
3. 使用 `git rebase -i --autosquash base` 来进行自动变基,你只需要输入 `:q` 来关闭确认页面即可;
|
||||
4. 运行 Gradle 任务 `rebuildPatches` 来修改已被修改的补丁;
|
||||
5. 将修改后的补丁 PR 发回储存库。
|
||||
0
scripts/PushToAPI.sh
Normal file
0
scripts/PushToAPI.sh
Normal file
Reference in New Issue
Block a user