mirror of
https://github.com/truenas/scale-build.git
synced 2025-12-24 04:50:48 +00:00
Publish update
This commit is contained in:
22
scripts/build_update_manifest.py
Normal file
22
scripts/build_update_manifest.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# -*- coding=utf-8 -*-
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
output, release_file = sys.argv[1:]
|
||||
|
||||
with open(os.path.join(output, "manifest.json")) as f:
|
||||
manifest = json.load(f)
|
||||
|
||||
with open(f"{release_file}.sha256") as f:
|
||||
checksum = f.read().split()[0]
|
||||
|
||||
with open(os.path.join(os.path.dirname(release_file), "manifest.json"), "w") as f:
|
||||
json.dump({
|
||||
"filename": os.path.basename(release_file),
|
||||
"version": manifest["version"],
|
||||
"date": manifest["date"],
|
||||
"changelog": "",
|
||||
"checksum": checksum,
|
||||
}, f)
|
||||
Reference in New Issue
Block a user