Browse Source

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

pull/300/head
Armin Ronacher 13 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 datetime import datetime, date
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
_date_clean_re = re.compile(r'(\d+)(st|nd|rd|th)')
def parse_changelog(): def parse_changelog():
with open('CHANGES') as f: with open('CHANGES') as f:
@ -52,8 +54,7 @@ def bump_version(version):
def parse_date(string): def parse_date(string):
string = string.replace('th ', ' ').replace('nd ', ' ') \ string = _date_clean_re.sub(r'\1', string)
.replace('rd ', ' ').replace('st ', ' ')
return datetime.strptime(string, '%B %d %Y') return datetime.strptime(string, '%B %d %Y')

Loading…
Cancel
Save