Move development tips to CONTRIBUTING.mf

This commit is contained in:
Minecon724 2025-06-04 20:49:37 +02:00
commit ac9deb773f
Signed by: Minecon724
GPG key ID: A02E6E67AB961189
2 changed files with 66 additions and 68 deletions

View file

@ -5,3 +5,69 @@ The Forgejo project is run by a community of people who are expected to follow t
Sensitive security-related issues should be reported to [security@forgejo.org](mailto:security@forgejo.org) using [encryption](https://keyoxide.org/security@forgejo.org).
You can find links to the different aspects of Developer documentation on this page: [Forgejo Contributor Guide](https://forgejo.org/docs/next/contributor/).
## For developers
Consider the below an appendix to the valuable [official *Forgejo Contributor Guide*](https://forgejo.org/docs/next/contributor).
For any development work, it's recommended to use the devcontainer.
### Building
Build a single image for multiple architectures:
1. Setup: (do this once)
```bash
docker buildx create --name mybuilder --use
docker buildx inspect --bootstrap
docker run --privileged --rm tonistiigi/binfmt --install all
```
2. Build:
```bash
docker buildx build --platform linux/amd64,linux/arm64 -t user/repo:tag --push .
```
Replace the tag. You can add more architectures, if you wish.
For non-Docker builds, [use the official instructions](https://forgejo.org/docs/next/contributor/from-source/).
### Live reload
Live reload make it easy to view changes.
```bash
TAGS='sqlite sqlite_unlock_notify' make watch
```
It's still recommended to restart whenever it's convenient, or making a bigger change.
### Merge
Merging changes from vanilla.
Make sure you checked out the branch to merge to.
1. Add the upstream repository, if you haven't already:
```bash
git remote add upstream https://codeberg.org/forgejo/forgejo.git
```
2. Fetch changes: (note: `--no-tags` is necessary)
```bash
git fetch --no-tags upstream
```
3. Merge the changes into the fork:
```bash
git merge upstream/$BRANCH
```
### Tag a release
```
git tag $TAG
git push origin tag $TAG
```

View file

@ -47,71 +47,3 @@ The agreement for this license [was documented in June 2023](https://codeberg.or
## Get involved
If you are interested in making Forgejo better, either by reporting a bug or by changing the governance, please [take a look at the contribution guide](CONTRIBUTING.md).
<!-- Perhaps move the below somewhere else? -->
## For developers
Consider the below an appendix to the valuable [official *Forgejo Contributor Guide*](https://forgejo.org/docs/next/contributor).
For any development work, it's recommended to use the devcontainer.
### Building
Build a single image for multiple architectures:
1. Setup: (do this once)
```bash
docker buildx create --name mybuilder --use
docker buildx inspect --bootstrap
docker run --privileged --rm tonistiigi/binfmt --install all
```
2. Build:
```bash
docker buildx build --platform linux/amd64,linux/arm64 -t user/repo:tag --push .
```
Replace the tag. You can add more architectures, if you wish.
For non-Docker builds, [use the official instructions](https://forgejo.org/docs/next/contributor/from-source/).
### Live reload
Live reload make it easy to view changes.
```bash
TAGS='sqlite sqlite_unlock_notify' make watch
```
It's still recommended to restart whenever it's convenient, or making a bigger change.
### Merge
Merging changes from vanilla.
Make sure you checked out the branch to merge to.
1. Add the upstream repository, if you haven't already:
```bash
git remote add upstream https://codeberg.org/forgejo/forgejo.git
```
2. Fetch changes: (note: `--no-tags` is necessary)
```bash
git fetch --no-tags upstream
```
3. Merge the changes into the fork:
```bash
git merge upstream/$BRANCH
```
### Tag a release
```
git tag $TAG
git push origin tag $TAG
```