From 0f7c20ae81e2dabd6e713299a28495d42e5d6e82 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Thu, 8 Dec 2016 11:50:03 -0500 Subject: [PATCH] Build: NORELEASE is the same as norelease (#22006) Changes the build to recognize `NORELEASE` as well as `NOCOMMIT` to mean the same thing as `norelease` and `nocommit` respectively. This is useful because people have been using them that way but haven't realized that only the lowercase versions worked. This also explicitly forbids silly things like `NoReLeAsE` and `noCOMMIT`, failing the build and telling you to spell them properly. --- .../gradle/precommit/ForbiddenPatternsTask.groovy | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ForbiddenPatternsTask.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ForbiddenPatternsTask.groovy index 7cb344bf47f..ed62e88c567 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ForbiddenPatternsTask.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ForbiddenPatternsTask.groovy @@ -59,11 +59,16 @@ public class ForbiddenPatternsTask extends DefaultTask { filesFilter.exclude('**/*.png') // add mandatory rules - patterns.put('nocommit', /nocommit/) + patterns.put('nocommit', /nocommit|NOCOMMIT/) + patterns.put('nocommit should be all lowercase or all uppercase', + /((?i)nocommit)(?