Skip to content

Commit d4c2f4b

Browse files
committed
Hotfix date check in release check script
Allow equal release dates if they are today.
1 parent 7c9c173 commit d4c2f4b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

check_release.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,11 @@ def main():
126126
version_prev = get_version(spec_head)
127127

128128
# Assert date update
129-
if not date_new > date_prev:
129+
if not (date_new > date_prev or
130+
date_new.date() == date_prev.date() == datetime.date.today()):
130131
raise SpecError("new 'last modified date' ({:%d %B %Y}) must be greater"
131-
" than the previous one ({:%d %B %Y})".format(date_new, date_prev))
132+
" than the previous one ({:%d %B %Y}) or both must be today.".format(
133+
date_new, date_prev))
132134

133135
# Assert version bump type depending on the PR originating branch
134136
# - if the originating branch is 'draft', it must be a major (x)or minor bump

0 commit comments

Comments
 (0)