Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 505cd663cd75b5593a1c9db0eded5298bd67139a 1 parent 5b16532
@mitsuhiko authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 scripts/make-release.py
View
5 scripts/make-release.py
@@ -16,6 +16,8 @@
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')
Please sign in to comment.
Something went wrong with that request. Please try again.