Last active
August 29, 2015 13:57
-
-
Save ushkinaz/9365641 to your computer and use it in GitHub Desktop.
Почти полный ребилд приложения
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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