Skip to content

Commit

Permalink
Write Gitpod app.ini only once (#23192)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
yardenshoham and delvh committed Feb 28, 2023
1 parent cbc9a0f commit 443dcc2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 443dcc2

Please sign in to comment.