From 333a155ba9bc8a90ef3b08404ba847dda878f997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 9 May 2017 09:30:08 +0200 Subject: [PATCH] post-receive-alternativearch - catch removals too Currently the patterns can catch ExcludeArch & co additions and changes in the spec file, but not a clean removal. --- roles/git/hooks/files/post-receive-alternativearch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/git/hooks/files/post-receive-alternativearch b/roles/git/hooks/files/post-receive-alternativearch index 4b23fb231f..16d8cef4dd 100755 --- a/roles/git/hooks/files/post-receive-alternativearch +++ b/roles/git/hooks/files/post-receive-alternativearch @@ -17,7 +17,8 @@ import sys from email.mime.text import MIMEText abspath = os.path.abspath(os.environ['GIT_DIR']) -PATTERNS = ('+ExclusiveArch:', '+ExcludeArch:', '+%ifarch', '+%ifnarch') +PATTERNS = ('+ExclusiveArch:', '+ExcludeArch:', '+%ifarch', '+%ifnarch', + '-ExclusiveArch:', '-ExcludeArch:', '-%ifarch', '-%ifnarch') FROM_EMAIL = 'githook-noreply@fedoraproject.org' TO_MAIL = 'arch-excludes@lists.fedoraproject.org' CGIT_URL = 'https://src.fedoraproject.org/cgit/%s/commit/?id=%s'