-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.sh
85 lines (67 loc) · 1.86 KB
/
README.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
cat <<EOF
Notqmail patch checker
======================
For maintaining
[patch](https://github.com/notqmail/notqmail/wiki/Patches)
compatibility and still permit the source to evolve, this Makefile
builds notqmail for each combination of patch and branch below.
EOF
echo "<table>"
# table header
echo " <tr>"
echo " <th>patch</th>"
while read branch; do
commit=$(git -C notqmail.git rev-parse $branch)
echo " <th><a href="$url/$commit">${branch#notqmail-}</a></th>"
done <conf-branch
echo " </tr>"
# table rows
url=https://github.com/notqmail/notqmail/commits
for patch in patch/*; do
patch=$(basename "$patch" .patch)
echo " <tr>"
echo " <td>$patch</td>"
while read branch; do
commit=$(git -C notqmail.git rev-parse $branch)
result=$(tail -n 1 log/$commit-$patch.log | grep -x ok || echo error)
echo " <td><a href="log/$commit-$patch.log">$result</a></td>"
done <conf-branch
echo " </tr>"
done
echo "</table>"
cat <<'EOF'
Testing an individual branch/patch combo
----------------------------------------
```
make BRANCH=refactoring PATCH=big-todo
```
This will produce log result in `log/$commit-big-todo.log`.
Testing all patches
-------------------
```
make patches BRANCH=refactoring
```
For instance, after a commit, for checking if patches still
apply or if they need a rework.
Testing all branches
--------------------
```
make branches PATCH=big-todo
```
For instance, after changing a patch to check if it now works
better on notqmail.
Branches tested are listed in `conf-branch`.
Testing all patches and all branches
------------------------------------
```
make everything
```
Checking every merge request
----------------------------
```
make brokemaster BRANCH=refactoring
```
This can be used in a script that automatically runs on merge request.
This will return an error only if the current branch broke more patches
than what master did already.
EOF