Files
gerrit/tools/release.sh
Shawn Pearce 32b461e7fe Always build all components of Gerrit
If we are committed to Maven as a build tool we need to have Maven
always building the correct targets when a user runs `mvn package`.
Include all modules as part of the build, all of the time.

Change-Id: I23f02cf040437bfe91e8badb6fdb6f765e707b6f
2013-05-06 12:25:49 -07:00

40 lines
678 B
Bash
Executable File

#!/bin/sh
flags=
while [ $# -gt 0 ]
do
case "$1" in
--no-documentation|--without-documentation)
flags="$flags -Dgerrit.documentation.skip=true"
shift
;;
*)
echo >&2 "usage: $0 [--without-documentation]"
exit 1
esac
done
git update-index -q --refresh
if test -n "$(git diff-index --name-only HEAD --)" \
|| test -n "$(git ls-files --others --exclude-standard)"
then
echo >&2 "error: working directory is dirty, refusing to build"
exit 1
fi
./tools/version.sh --release &&
mvn clean install $flags
rc=$?
./tools/version.sh --reset
if test 0 = $rc
then
echo
echo Built Gerrit Code Review `git describe`:
ls gerrit-war/target/gerrit-*.war
echo
fi
exit $rc