forgejo/docs/unsure-where-to-put/dev-notes.md

71 lines
1.7 KiB
Markdown
Raw Normal View History

2023-11-10 13:06:17 +00:00
# enable federation
copy the app.ini in this folder in custom/conf in the forgejo root directory.
Then change the paths in app.ini accordingly to you local environment.
2023-11-10 13:37:00 +00:00
```
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;
; ; SQLite Configuration
; ;
DB_TYPE = sqlite3
; defaults to data/gitea.db
PATH = /home/jem/repo/opensource/forgejo/data/gitea.db
; Query timeout defaults to: 500
SQLITE_TIMEOUT =
; defaults to sqlite database default (often DELETE), can be used to enable WAL mode. https://www.sqlite.org/pragma.html#pragma_journal_mode
SQLITE_JOURNAL_MODE =
HOST =
NAME =
USER =
PASSWD =
SCHEMA =
SSL_MODE = disable
LOG_SQL = false
[federation]
ENABLED = true
```
# build
```
2023-10-27 09:50:39 +00:00
TAGS="sqlite" make build generate-swagger
```
# launch local
```
2023-10-27 09:50:39 +00:00
./gitea admin user create --name me --password me --email "buero@meissa.de"
./gitea admin user generate-access-token -u me -t token --scopes write:activitypub,write:repository,write:user
```
# sync base branch
```
2023-11-06 08:27:41 +00:00
# setup a second repo for excosy implementation
git clone https://git.exozy.me/a/gitea.git exosy
2023-11-06 08:12:09 +00:00
# add remotes
git remote add forgejo git@codeberg.org:forgejo/forgejo.git
# rebase on top of forgejo/forge-development
git checkout forgejo-development
2023-11-07 17:01:52 +00:00
git fetch forgejo
2023-11-03 16:05:48 +00:00
git rebase --onto forgejo/forgejo-development
git push --force
git checkout forgejo-federated-star
git rebase forgejo-development
git push --force
2023-11-03 16:58:47 +00:00
2023-11-06 08:12:09 +00:00
# continue local development after rebase & force-push has happened
2023-11-03 16:58:47 +00:00
git reset --hard origin/forgejo-federated-star
2023-11-03 16:45:53 +00:00
```
2023-11-15 08:08:17 +00:00
# generate swagger api client
2023-11-17 09:10:28 +00:00
go run github.com/go-swagger/go-swagger/cmd/swagger@v0.30.5 generate client -f './templates/swagger/v1_json.tmpl' -c "code.gitea.io/sdk" --operation 'GET /activitypub/user-id/{user-id} activitypub activitypubPerson' --skip-validation
2023-11-15 08:08:17 +00:00