From d5d59ed71f41d845c76e36d159e222877b3aa666 Mon Sep 17 00:00:00 2001 From: Chen-I Lim Date: Wed, 20 Jan 2021 14:09:41 -0800 Subject: [PATCH] Move app config to app-config.json --- .gitignore | 2 ++ Makefile | 11 +++++------ mac/resources/config.json => app-config.json | 1 - linux/main.go | 2 +- win/main.go | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) rename mac/resources/config.json => app-config.json (78%) diff --git a/.gitignore b/.gitignore index 2a06311ca..3b2d42667 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,8 @@ octo*.db .eslintcache .vscode/settings.json .prettierrc.json +# config.json is copied from app-config.json in the Makefile +mac/resources/config.json mac/temp mac/dist linux/bin diff --git a/Makefile b/Makefile index 21663078a..e8c5179f2 100644 --- a/Makefile +++ b/Makefile @@ -108,6 +108,7 @@ mac-app: server-mac webapp rm -rf mac/resources/pack mkdir -p mac/resources/bin cp bin/mac/octoserver mac/resources/bin/octoserver + cp -R app-config.json mac/resources/config.json cp -R webapp/pack mac/resources/pack mkdir -p mac/temp xcodebuild archive -workspace mac/Tasks.xcworkspace -scheme Tasks -archivePath mac/temp/tasks.xcarchive CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" CODE_SIGNING_ALLOWED="NO" @@ -120,20 +121,18 @@ win-app: server-win webapp cd win; make build mkdir -p win/temp/bin cp -R bin/win/octoserver.exe win/temp/bin - cp -R config.json win/temp - mkdir -p win/temp/webapp - cp -R webapp/pack win/temp/webapp/pack + cp -R app-config.json win/temp/config.json + cp -R webapp/pack win/temp/pack mkdir -p win/dist # cd win/temp; tar -acf ../dist/tasks-win.zip . cd win/temp; powershell "Compress-Archive * ../dist/tasks-win.zip" linux-app: server-linux webapp rm -rf linux/temp - mkdir -p linux/temp/tasks-app/webapp mkdir -p linux/dist cp -R bin/linux/octoserver linux/temp/tasks-app/ - cp -R config.json linux/temp/tasks-app/ - cp -R webapp/pack linux/temp/tasks-app/webapp/pack + cp -R app-config.json linux/temp/tasks-app/config.json + cp -R webapp/pack linux/temp/tasks-app/pack cd linux; make build cp -R linux/bin/tasks-app linux/temp/tasks-app/ cd linux/temp; tar -zcf ../dist/tasks-linux.tar.gz tasks-app diff --git a/mac/resources/config.json b/app-config.json similarity index 78% rename from mac/resources/config.json rename to app-config.json index 9aa05c805..eed9d38ae 100644 --- a/mac/resources/config.json +++ b/app-config.json @@ -3,7 +3,6 @@ "port": 8088, "dbtype": "sqlite3", "dbconfig": "./octo.db", - "postgres_dbconfig": "dbname=octo sslmode=disable", "useSSL": false, "webpath": "./pack", "filespath": "./files", diff --git a/linux/main.go b/linux/main.go index 58c34b460..863a1ef8a 100644 --- a/linux/main.go +++ b/linux/main.go @@ -29,7 +29,7 @@ func main() { w.SetTitle("Octo Tasks") w.SetSize(1024, 768, webview.HintNone) - w.Navigate("http://localhost:8000") + w.Navigate("http://localhost:8088") w.Run() cancel() } diff --git a/win/main.go b/win/main.go index 13ca35a99..43c72b311 100644 --- a/win/main.go +++ b/win/main.go @@ -36,7 +36,7 @@ func main() { ctx, cancel := context.WithCancel(context.Background()) cmd := runOctoTasks(ctx) - ui, err := lorca.New("http://localhost:8000", "", 1024, 768) + ui, err := lorca.New("http://localhost:8088", "", 1024, 768) if err != nil { log.Fatal(err) }