aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-10-02 12:08:32 -0400
committerJack Lloyd <[email protected]>2017-10-02 12:08:32 -0400
commitddff30cbcb968aa7e766dd778f22a3246a5c35fb (patch)
tree25ee3fffc05e883fa80b174988d63f3ebd261308 /src/scripts
parent4fbd7d243481f81a60daaca3ef904ddf14026c26 (diff)
Fix parsing of git datestamps in release script
[ci skip]
Diffstat (limited to 'src/scripts')
-rwxr-xr-xsrc/scripts/dist.py8
1 files changed, 4 insertions, 4 deletions
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':