From fdc35f48ed193c94cec6627450cafeffd229bbf4 Mon Sep 17 00:00:00 2001 From: Naoki Takezoe Date: Sun, 19 Mar 2023 11:48:07 +0900 Subject: [PATCH] Update the developer doc (#3257) --- doc/build.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/build.md b/doc/build.md index 7af121fe4..4026ea053 100644 --- a/doc/build.md +++ b/doc/build.md @@ -18,7 +18,21 @@ $ sbt ~jetty:start Then access `http://localhost:8080/` in your browser. The default administrator account is `root` and password is `root`. -Source code modifications are detected and a reloading happens automatically. You can modify the logging configuration by editing `src/main/resources/logback-dev.xml`. +Source code modifications are detected and a reloading happens automatically. +You can modify the logging configuration by editing `src/main/resources/logback-dev.xml`. + +Note that HttpSession is cleared when auto-reloading happened. +This is a bit annoying when developing features that requires sign-in. +You can keep HttpSession even if GitBucket is restarted by enabling this configuration in `build.sbt`: +https://github.com/gitbucket/gitbucket/blob/d5c083b70f7f3748d080166252e9a3dcaf579648/build.sbt#L292 + +Or by launching GitBucket with the following command: +```shell +sbt '; set Jetty/javaOptions += "-Ddev-features=keep-session" ; ~jetty:start' +``` + +Note that this feature serializes HttpSession on the local disk and assigns all requests to the same session +which means you cannot test multi users behavior in this mode. Build war file -------- @@ -37,7 +51,8 @@ To build an executable war file, run $ sbt executable ``` -at the top of the source tree. It generates executable `gitbucket.war` into `target/executable`. We release this war file as release artifact. +at the top of the source tree. It generates executable `gitbucket.war` into `target/executable`. +We release this war file as release artifact. Run tests spec ---------