STAYRTR_BINARY: /usr/bin/stayrtr
stages:
+ - consistency
- image
- build
- pkg
- release
## Common rules
+# Ignore WIP commits
.never_wip: &never_wip
- # Ignore WIP commits
if: $CI_COMMIT_MESSAGE =~ /^(fixup! )*WIP/
when: never
+# Run for stable branches
+.if_stable: &if_stable
+ if: $CI_COMMIT_BRANCH =~ /^(stable-.*|thread-next|master)$/
+ when: always
+
+## Consistency checks for stable branches
+commit-messages:
+ stage: consistency
+ script:
+ - tools/git-check-commits
+ rules:
+ - *if_stable
+ - when: never
## Docker Image Rules
#
--- /dev/null
+#!/bin/sh
+
+git log --oneline | awk \
+ '{
+ # Ignore two fixups deeply buried inside the history
+ if (index("a54f75f454b7ed8c8ff2c1787a506528f22cbae7", $1) == 1)
+ next;
+ if (index("bea582cbb53e30dd32a5b6829c7443e0e5558d11", $1) == 1)
+ next;
+
+ # Complain about fixups and WIPs
+ if ((index($2, "fixup!") == 1) || (index($2, "WIP") == 1))
+ {
+ if (!bad) print "Branch contains unfinished work!"
+ bad = 1
+ print
+ }
+ }
+ END { if (bad) exit 1 }'