|
|
@ -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') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|