From ddff30cbcb968aa7e766dd778f22a3246a5c35fb Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Mon, 2 Oct 2017 12:08:32 -0400 Subject: Fix parsing of git datestamps in release script [ci skip] --- src/scripts/dist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/scripts') diff --git a/src/scripts/dist.py b/src/scripts/dist.py index 97f9fd68e..2e7fa521d 100755 --- a/src/scripts/dist.py +++ b/src/scripts/dist.py @@ -200,8 +200,8 @@ def rewrite_version_file(version_file, target_version, snapshot_branch, rev_id, def rel_date_to_epoch(rel_date): rel_str = str(rel_date) year = int(rel_str[0:4]) - month = int(rel_str[5:6]) - day = int(rel_str[7:8]) + month = int(rel_str[4:6]) + day = int(rel_str[6:8]) dt = datetime.datetime(year, month, day, 6, 0, 0) return (dt - datetime.datetime(1970, 1, 1)).total_seconds() @@ -320,10 +320,10 @@ def main(args=None): logging.error('No date found for version') return 2 - rel_epoch = rel_date_to_epoch(rel_date) - logging.info('Found %s at revision id %s released %d' % (target_version, rev_id, rel_date)) + rel_epoch = rel_date_to_epoch(rel_date) + def output_name(): if snapshot_branch: if snapshot_branch == 'master': -- cgit v1.2.3