Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions installer/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@ def create_tar_gz(archive_name, files):
with tarfile.open(archive_name, "w:gz") as tar:
for file in files:
if os.path.isfile(file):
tar.add(file)
print(f"Added '{file}' to '{archive_name}'.")
# Add file with its original name (no path)
arcname = os.path.basename(file)
tar.add(file, arcname=arcname)
print(f"Added '{file}' as '{arcname}' to '{archive_name}'.")
else:
print(f"Error: '{file}' does not exist and was not added.")
print(f"\nArchive '{archive_name}' created successfully.")

# Verify the archive contents
print("\nVerifying archive contents:")
with tarfile.open(archive_name, "r:gz") as tar:
for member in tar.getnames():
print(f" - {member}")

except Exception as e:
print(f"An error occurred while creating the archive: {e}")
sys.exit(1)

def main():

Expand Down