Skip to content

Commit

Permalink
Add debug log to package/versions scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mario4tier committed Dec 18, 2024
1 parent 4d91a8e commit 4562480
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions scripts/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,8 @@ def package_all_windows(root_dir: str, version: str):
root_dir = verify_git_repo()
is_updated, version = sync_versions(root_dir)
is_updated, digest = sync_sources_digest(root_dir)
sys.exit(0)

host_platform = sys.platform
if host_platform == "linux":
package_all_linux(root_dir,version,sudo_pwd)
Expand Down
9 changes: 6 additions & 3 deletions scripts/utilities/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ def sync_sources_digest(root_dir: str) -> Tuple[bool,str]:
]
file_list = expand_globs(root_dir, file_patterns)

print(f"File list")
for file_path in file_list:
print(file_path)

# Remove duplicate entries in file_list
file_list = list(set(file_list))

Expand All @@ -397,18 +401,17 @@ def sync_sources_digest(root_dir: str) -> Tuple[bool,str]:
sys.exit(1)

sources_hash = running_hash.hexdigest()


print(f"Calculated SOURCES-HASH: {sources_hash}")

# Write to the SOURCES-VERSION file (touch only if different)
current_digest = read_sources_digest(root_dir)
if current_digest == sources_hash:
return False, sources_hash

# A difference was detected, display info to help debugging.
print(f"Difference detected")
for file_path in sorted_files:
print(file_path)
print(f"Calculated SOURCES-HASH: {sources_hash}")

write_sources_digest(root_dir, sources_hash)
return True, sources_hash

0 comments on commit 4562480

Please sign in to comment.