-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare-to-commit.sh
executable file
·42 lines (31 loc) · 1.11 KB
/
prepare-to-commit.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
abort() {
echo >&2 '
*************************************************************************
*** You are not ready to commit! Fix the errors above and re-execute. ***
*************************************************************************
'
echo "An error occurred. Exiting..." >&2
exit 1
}
trap 'abort' 0
set -e
#########################################
# SCRIPTS_START
#########################################
# Uncomment the line below if you want to include license information in your source files.
./mvnw license:update-file-header
./mvnw fmt:format
# Add profile "validate-license" in the line below to validate license information.
./mvnw clean install -P validate-license,validate-code-format,validate-code-style,validate-code-bugs,validate-code,docs \
-DskipTests=true -Dmaven.javadoc.skip=true -B -V
./mvnw test -B
#########################################
# SCRIPTS_END
#########################################
trap : 0
echo >&2 '
***********************************************
*** GOOD JOB! You are ready to commit now. ***
***********************************************
'