On 2017-07-17 14:28:28, Michael D Kinney wrote:
> https://bugzilla.tianocore.org/show_bug.cgi?id=628
>
> Update PatchCheck.py to support either
> "Contributed-under: TianoCore Contribution Agreement 1.0"
> or "Contributed-under: TianoCore Contribution Agreement 1.1"
> in the commit message.
>
> Cc: Leif Lindholm <[email protected]>
> Cc: Andrew Fish <[email protected]>
> Cc: Jordan Justen <[email protected]>
> Cc: Liming Gao <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Michael D Kinney <[email protected]>
> ---
> BaseTools/Scripts/PatchCheck.py | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
> index 7bc5736dbf..135f1c0112 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -77,8 +77,10 @@ class CommitMessageCheck:
> def check_contributed_under(self):
> cu_msg='Contributed-under: TianoCore Contribution Agreement 1.0'
> if self.msg.find(cu_msg) < 0:
> - self.error('Missing Contributed-under! (Note: this must be ' +
> - 'added by the code contributor!)')
> + cu_msg='Contributed-under: TianoCore Contribution Agreement 1.1'
> + if self.msg.find(cu_msg) < 0:
> + self.error('Missing Contributed-under! (Note: this must be '
> +
> + 'added by the code contributor!)')
I'd probably try for a regex. Something like:
'^\s*Contributed-under: TianoCore Contribution Agreement 1\.[01]\s*$'
But you could also do something like:
for ver in ('1.0', '1.1'):
cu_msg='Contributed-under: TianoCore Contribution Agreement ' + ver
...
if found: return
self.error('Missing Contributed-under! (Note: this must be ' +
'added by the code contributor!)')
-Jordan
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel