diff --git a/doc/how_to_run.md b/doc/how_to_run.md index 3a4961f..6773b3d 100644 --- a/doc/how_to_run.md +++ b/doc/how_to_run.md @@ -16,6 +16,8 @@ -------- If you want to modify source code and confirm it, you can run GitBucket in auto reloading mode as following: +Windows: + ``` C:\gitbucket> sbt ... @@ -24,20 +26,38 @@ > ~ ;copy-resources;aux-compile ``` +Linux: + +``` +~/gitbucket$ ./sbt.sh +... +> container:start +... +> ~ ;copy-resources;aux-compile +``` + Build war file -------- To build war file, run the following command: +Windows: + ``` C:\gitbucket> sbt package ``` +Linux: + +``` +~/gitbucket$ ./sbt.sh package +``` + `gitbucket_2.11-x.x.x.war` is generated into `target/scala-2.11`. To build executable war file, run -* `. ./env.sh` -* `ant -f release/build.xml all` +* Windows: `???` +* Linux: `./release/make-release-war.sh` at the top of the source tree. It generates executable `gitbucket.war` into `target/scala-2.11`. We release this war file as release artifact. diff --git a/release/make-release-war.sh b/release/make-release-war.sh index c276cf9..b9aacec 100755 --- a/release/make-release-war.sh +++ b/release/make-release-war.sh @@ -1,3 +1,15 @@ #!/bin/sh -. ../env.sh -ant -f build.xml all +D="$(dirname "$0")" +D="$(cd "${D}"; pwd)" +DD="$(dirname "${D}")" +( + for f in "${DD}/env.sh" "${D}/build.xml"; do + if [ ! -s "${f}" ]; then + echo >&2 "$0: Unable to access file '${f}'" + exit 1 + fi + done + cd "${DD}" + . "${DD}/env.sh" + ant -f "${D}/build.xml" all +)