Skip to content

Commit ca75620

Browse files
Merge pull request #2 from MikroElektronika/topic/indexing-update-install-paths
Updated packaging and indexing
2 parents 4d9d3b9 + 4b99fe7 commit ca75620

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
output
44
__pycache__
55
*.7z
6+
temp

scripts/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def index_release_to_elasticsearch(es : Elasticsearch, index_name, release_detai
6868
'updated_at' : asset['updated_at'],
6969
'category': 'Software Development Kit',
7070
'download_link': asset['url'], # Adjust as needed for actual URL
71-
'install_location' : f"%APPLICATION_DATA_DIR%/packages/legacy/{name_without_extension}",
71+
'install_location' : f"%APPLICATION_DATA_DIR%/packages/legacy/{name_without_extension.lower()}",
7272
'package_changed': True
7373
}
7474

scripts/package_assets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
def zip_directory(data):
1212
dirToZip, version = data
1313
source_dir = f"packages/{dirToZip}"
14-
result_dir = f"temp/{source_dir}/legacy-{dirToZip}"
14+
result_dir = f"temp/{source_dir}/legacy-{dirToZip.lower()}"
1515
print(f"Starting to copy files from {source_dir} to {result_dir}...")
1616
shutil.copytree(source_dir, result_dir, dirs_exist_ok=True)
1717
print(f"Files copied successfully to {result_dir}.")
1818
archive_name = f"{os.path.dirname(result_dir)}/{dirToZip}.7z"
1919
print(f"Starting to create archive {archive_name}...")
2020
with py7zr.SevenZipFile(archive_name, mode='w') as z:
21-
z.writeall(result_dir, f"legacy-{dirToZip}")
21+
z.writeall(result_dir, f"legacy-{dirToZip.lower()}")
2222
print(f"Archive {archive_name} created successfully.")
2323
return archive_name
2424

0 commit comments

Comments
 (0)