浏览代码

Add sizeInBytes of zip files to nightly.json generation

Mikkel Hjortshoej 5 年之前
父节点
当前提交
bb3e0fa03f
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      ci/create_nightly_json.py

+ 2 - 0
ci/create_nightly_json.py

@@ -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')
             
@@ -28,6 +29,7 @@ def main():
                                             'name': name,
                                             'url': url,
                                             'sha1': sha1,
+                                            'sizeInBytes': size,
                                          })
 
     now = datetime.datetime.utcnow().isoformat()