diff options
author | Yarden Shoham <hrsi88@gmail.com> | 2023-02-28 17:30:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-28 23:30:43 +0800 |
commit | 443dcc2db0676cae8b1b72c1b0b99e675c21177c (patch) | |
tree | 8d20071579799a66a5a6fccc2795f5a1a797f575 | |
parent | cbc9a0fe477b1b8af249ca0b8dac5fc2be64e9f6 (diff) | |
download | gitea-443dcc2db0676cae8b1b72c1b0b99e675c21177c.tar.gz gitea-443dcc2db0676cae8b1b72c1b0b99e675c21177c.zip |
Write Gitpod `app.ini` only once (#23192)
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>
-rw-r--r-- | .gitpod.yml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/.gitpod.yml b/.gitpod.yml index a184e6376e..506c620458 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -10,9 +10,12 @@ tasks: - name: Run backend command: | gp sync-await setup - 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 + 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 |