summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Pearce <sop@google.com>2013-05-06 12:16:45 -0700
committerShawn Pearce <sop@google.com>2013-05-06 12:16:45 -0700
commit05751387f0998f0d50cff7b71455b890ca19bddc (patch)
tree0e055632a9fd8ce6ffe58e8957fda234c852fecc
parent6602f150361869adf504ce672a8b5e5c8e290631 (diff)
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
-rw-r--r--gerrit-war/pom.xml4
-rwxr-xr-xtools/release.sh17
2 files changed, 5 insertions, 16 deletions
diff --git a/gerrit-war/pom.xml b/gerrit-war/pom.xml
index dc1a3f72dc..71ed71ecc3 100644
--- a/gerrit-war/pom.xml
+++ b/gerrit-war/pom.xml
@@ -242,7 +242,7 @@ limitations under the License.
<id>include-documentation</id>
<phase>process-classes</phase>
<configuration>
- <target if="gerrit.include-documentation">
+ <target unless="gerrit.documentation.skip">
<property name="src" location="${basedir}/../Documentation" />
<property name="out" location="${project.build.directory}/${project.build.finalName}" />
<property name="dst" location="${out}/Documentation" />
@@ -269,7 +269,7 @@ limitations under the License.
<id>include-release-notes</id>
<phase>process-classes</phase>
<configuration>
- <target if="gerrit.include-documentation">
+ <target unless="gerrit.documentation.skip">
<property name="src" location="${basedir}/../ReleaseNotes" />
<property name="out" location="${project.build.directory}/${project.build.finalName}" />
<property name="dst" location="${out}/ReleaseNotes" />
diff --git a/tools/release.sh b/tools/release.sh
index 7d4c4574ad..4d2b26b2f5 100755
--- a/tools/release.sh
+++ b/tools/release.sh
@@ -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