We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8696f01 commit bd47bbfCopy full SHA for bd47bbf
1 file changed
check-branch.sh
@@ -0,0 +1,26 @@
1
+#/bin/sh
2
+
3
+# check-branch.sh - Iterate over all new commits of a topic branch,
4
+# recording whether the build passes or fails for each.
5
6
+commits=$@
7
+test "$commits" || commits=$(git rev-list HEAD ^master | tail -r)
8
9
+branch=$(git rev-parse --abbrev-ref HEAD)
10
11
+count=0
12
+for commit in $commits
13
+do
14
+ git checkout "$commit" > /dev/null 2>&1
15
+ mkdir -p tmp
16
+ prefix="$(printf %04d $count)"
17
+ filename="tmp/$prefix-$commit"
18
+ start=$(date +%s)
19
+ mvn clean verify > "$filename" 2>&1 && result=SUCCESS || result=FAILURE
20
+ end=$(date +%s)
21
+ let time="end-start"
22
+ echo "$prefix $commit $result $time"
23
+ let count="count+1"
24
+done
25
26
+git checkout "$branch" > /dev/null 2>&1
0 commit comments