
Rather than having 3 commands for a human to type in by hand, lets wrap it all up into a tiny shell script. Change-Id: I967416266e7cde3a2a5ae567bdc4524c874b4a34 Signed-off-by: Shawn O. Pearce <sop@google.com>
25 lines
445 B
Bash
Executable File
25 lines
445 B
Bash
Executable File
#!/bin/sh
|
|
|
|
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
|
|
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
|