Skip to content

Commit

Permalink
Add sizeInBytes of zip files to nightly.json generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisDevDane committed Apr 23, 2020
1 parent 026bb8e commit bb3e0fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ci/create_nightly_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def main():
name = remove_prefix(data['fileName'], "nightly/")
url = f"https://f001.backblazeb2.com/file/{bucket}/nightly/{urllib.parse.quote_plus(name)}"
sha1 = data['contentSha1']
size = int(data['contentLength'])
ts = int(data['fileInfo']['src_last_modified_millis'])
date = datetime.datetime.fromtimestamp(ts/1000).strftime('%Y-%m-%d')

Expand All @@ -28,6 +29,7 @@ def main():
'name': name,
'url': url,
'sha1': sha1,
'sizeInBytes': size,
})

now = datetime.datetime.utcnow().isoformat()
Expand Down

0 comments on commit bb3e0fa

Please sign in to comment.