Skip to content

Instantly share code, notes, and snippets.

@ushkinaz
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ushkinaz/9365641 to your computer and use it in GitHub Desktop.
Save ushkinaz/9365641 to your computer and use it in GitHub Desktop.
Почти полный ребилд приложения
#!/bin/bash
build_env=nxt
function on_build_start {
start_time=`date +%s`
}
function on_build_end {
end_time=`date +%s`
duration=`expr $end_time - $start_time`
if [[ $1 -ne 0 ]]; then
notify-send --urgency=low -t 100 -i error "Full test failed, took $duration seconds."
else
notify-send --urgency=low -t 100 -i info "Full test completed, took $duration seconds."
fi
exit $1
}
function check_result {
if [[ $1 -ne 0 ]]; then
on_build_end $1
fi
}
start_time=`date +%s`
mvn --fail-fast -B -T 2.0C -P $build_env,-reports -DskipTests clean install
check_result $?
mvn clean test -P $build_env,-reports
check_result $?
mvn clean test -Dtest=ContextInitializationTest -Dtest.groups=integration -P $build_env,-reports
check_result $?
on_build_end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment