bd4e609c3d
I can't trust Maven to run the tests with -Pacceptance. At least half of my attempts produced no tests run. This is of zero value to me as a build system, but our contributors have determined Gerrit will remain stuck with Maven. Stick contributors with the burden of running the acceptance tests by default. This way we know the tests are executed. Change-Id: I678e42651efc162f66929c605247583d7ef6cc8a
49 lines
934 B
Bash
Executable File
49 lines
934 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
|
|
;;
|
|
--no-plugins|--without-plugins)
|
|
flags="$flags -Dgerrit.plugins.skip=true"
|
|
shift
|
|
;;
|
|
--no-tests|--without-tests)
|
|
flags="$flags -Dgerrit.acceptance-tests.skip=true"
|
|
flags="$flags -Dmaven.tests.skip=true"
|
|
shift
|
|
;;
|
|
*)
|
|
echo >&2 "usage: $0 [--no-documentation] [--no-plugins] [--no-tests]"
|
|
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 package verify $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
|