mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Add depot names to manifest json
This commit is contained in:
parent
631535a4c9
commit
de26e5735f
@ -39,22 +39,29 @@ def RecursiveComputeChecksum(directoryPath):
|
||||
#------------------------------------------------------------------------------
|
||||
# Save the checksums to a manifest file
|
||||
#------------------------------------------------------------------------------
|
||||
def CreateManifest(version, checksums, outManifestFile):
|
||||
def CreateManifest(version, depot, checksums, outManifestFile):
|
||||
manifest = {
|
||||
"version": version,
|
||||
"assets": checksums
|
||||
"depots": {
|
||||
depot: {
|
||||
"checksum": 0,
|
||||
"optional": False,
|
||||
"assets": checksums
|
||||
}
|
||||
}
|
||||
}
|
||||
with open(outManifestFile, "w") as jsonFile:
|
||||
json.dump(manifest, jsonFile, indent=4)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: bld_man.py <versionNum>")
|
||||
if len(sys.argv) != 3:
|
||||
print("Usage: bld_man.py <versionNum> <depotName>")
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
version = int(sys.argv[1])
|
||||
depot = sys.argv[2]
|
||||
except ValueError:
|
||||
print("Version must be an integer")
|
||||
sys.exit(1)
|
||||
@ -63,4 +70,4 @@ if __name__ == "__main__":
|
||||
outManifestFile = "patch_manifest.json"
|
||||
|
||||
checksums = RecursiveComputeChecksum(workingDirectory)
|
||||
CreateManifest(version, checksums, outManifestFile)
|
||||
CreateManifest(version, depot, checksums, outManifestFile)
|
||||
|
Loading…
x
Reference in New Issue
Block a user