mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-01 07:09:21 +01:00
443dcc2db0
Before this change, the `app.ini` would get overwritten on each workspace start, confusing Gitea. It asked for reinstallation each time. This makes sure the file is written only once by checking it does not exist before creating it. --- [Review without whitespace diff](https://github.com/go-gitea/gitea/pull/23192/files?w=1) --------- Co-authored-by: delvh <dev.lh@web.de>
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
tasks:
|
|
- name: Setup
|
|
init: |
|
|
cp -r contrib/ide/vscode .vscode
|
|
make deps
|
|
make build
|
|
command: |
|
|
gp sync-done setup
|
|
exit 0
|
|
- name: Run backend
|
|
command: |
|
|
gp sync-await setup
|
|
if [ ! -f custom/conf/app.ini ]
|
|
then
|
|
mkdir -p custom/conf/
|
|
echo -e "[server]\nROOT_URL=$(gp url 3000)/" > custom/conf/app.ini
|
|
echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = $GITPOD_REPO_ROOT/data/gitea.db" >> custom/conf/app.ini
|
|
fi
|
|
export TAGS="sqlite sqlite_unlock_notify"
|
|
make watch-backend
|
|
- name: Run frontend
|
|
command: |
|
|
gp sync-await setup
|
|
make watch-frontend
|
|
openMode: split-right
|
|
- name: Run docs
|
|
before: sudo bash -c "$(grep 'https://github.com/gohugoio/hugo/releases/download' Makefile | tr -d '\')" # install hugo
|
|
command: cd docs && make clean update && hugo server -D -F --baseUrl $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0
|
|
openMode: split-right
|
|
|
|
vscode:
|
|
extensions:
|
|
- editorconfig.editorconfig
|
|
- dbaeumer.vscode-eslint
|
|
- golang.go
|
|
- stylelint.vscode-stylelint
|
|
- DavidAnson.vscode-markdownlint
|
|
- johnsoncodehk.volar
|
|
- ms-azuretools.vscode-docker
|
|
- zixuanchen.vitest-explorer
|
|
- alexcvzz.vscode-sqlite
|
|
|
|
ports:
|
|
- name: Gitea
|
|
port: 3000
|
|
- name: Docs
|
|
port: 1313
|