Skip to content

Commit

Permalink
Restructure manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
aBozowski committed May 31, 2022
1 parent f6358a7 commit c4a99f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import optparse
import os
import shutil
import subprocess
import sys
import tarfile
import textwrap
Expand Down Expand Up @@ -123,13 +124,14 @@ def generate_device_manifest(
Returns:
Dict containing MD5 of device dir zap files.
"""
ci_manifest = {}
ci_manifest = {"devices":{}}
devices_manifest = ci_manifest["devices"]
for device_name in _DEVICE_LIST:
device_file_path = os.path.join(_DEVICE_FOLDER, device_name + ".zap")
with open(device_file_path, "rb") as device_file:
device_file_data = device_file.read()
device_file_md5 = hashlib.md5(device_file_data).hexdigest()
ci_manifest[device_name] = device_file_md5
devices_manifest[device_name] = device_file_md5
flush_print(f"Manifest for {device_name} : {device_file_md5}")
if write_manifest_file:
device_zzz_dir_root = os.path.join(_CHEF_ZZZ_ROOT, device_name)
Expand Down
4 changes: 3 additions & 1 deletion examples/chef/cimanifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"lighting-app": "81a1262e611fab1a71ac4129b91cec0f",
"devices": {
"lighting-app": "81a1262e611fab1a71ac4129b91cec0f"
},
"zap_commit": "TEMP DISABLED"
}

0 comments on commit c4a99f0

Please sign in to comment.