Always include documention in the build

By default run AsciiDoc and package the documentation as part of
the WAR. This ensures the default `mvn package` will include user
documentation, as folks have come to expect it to exist in builds.

If AsciiDoc is not available documentation can be skipped by
passing -Dgerrit.documentation.skip=true on the command line.
This naming convention matches with -Dmaven.test.skip=true as
a way to avoid running unit tests.

Change-Id: Ic433c5bb291c9abb48117d61c2eabc031a5c5ca0
This commit is contained in:
Shawn Pearce
2013-05-06 12:16:45 -07:00
parent 6602f15036
commit 05751387f0
2 changed files with 5 additions and 16 deletions

View File

@@ -1,12 +1,12 @@
#!/bin/sh
include_docs=-Dgerrit.include-documentation=1
flags=-Pall
while [ $# -gt 0 ]
do
case "$1" in
--no-documentation|--without-documentation)
include_docs=
flags="$flags -Dgerrit.documentation.skip=true"
shift
;;
*)
@@ -24,19 +24,8 @@ then
exit 1
fi
if test -n "$include_docs"
then
BINARY=asciidoc
if ! command -v $BINARY >/dev/null 2>&1
then
echo >&2 "error: $BINARY executable was not found. Either install $BINARY or use the --without-documentation option"
exit 1
fi
fi
./tools/version.sh --release &&
mvn clean install $include_docs -P all
mvn clean install $flags
rc=$?
./tools/version.sh --reset