Browse Source

Hopefully fixed release script date parsing thingy. This fixes #299

pull/300/head
Armin Ronacher 14 years ago
parent
commit
505cd663cd
  1. 5
      scripts/make-release.py

5
scripts/make-release.py

@ -16,6 +16,8 @@ import re
from datetime import datetime, date
from subprocess import Popen, PIPE
_date_clean_re = re.compile(r'(\d+)(st|nd|rd|th)')
def parse_changelog():
with open('CHANGES') as f:
@ -52,8 +54,7 @@ def bump_version(version):
def parse_date(string):
string = string.replace('th ', ' ').replace('nd ', ' ') \
.replace('rd ', ' ').replace('st ', ' ')
string = _date_clean_re.sub(r'\1', string)
return datetime.strptime(string, '%B %d %Y')

Loading…
Cancel
Save