Skip to content

Commit

Permalink
Merge pull request #2 from MikroElektronika/topic/indexing-update-ins…
Browse files Browse the repository at this point in the history
…tall-paths

Updated packaging and indexing
  • Loading branch information
StrahinjaJacimovic authored Jul 10, 2024
2 parents 4d9d3b9 + 4b99fe7 commit ca75620
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
output
__pycache__
*.7z
temp
2 changes: 1 addition & 1 deletion scripts/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def index_release_to_elasticsearch(es : Elasticsearch, index_name, release_detai
'updated_at' : asset['updated_at'],
'category': 'Software Development Kit',
'download_link': asset['url'], # Adjust as needed for actual URL
'install_location' : f"%APPLICATION_DATA_DIR%/packages/legacy/{name_without_extension}",
'install_location' : f"%APPLICATION_DATA_DIR%/packages/legacy/{name_without_extension.lower()}",
'package_changed': True
}

Expand Down
4 changes: 2 additions & 2 deletions scripts/package_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
def zip_directory(data):
dirToZip, version = data
source_dir = f"packages/{dirToZip}"
result_dir = f"temp/{source_dir}/legacy-{dirToZip}"
result_dir = f"temp/{source_dir}/legacy-{dirToZip.lower()}"
print(f"Starting to copy files from {source_dir} to {result_dir}...")
shutil.copytree(source_dir, result_dir, dirs_exist_ok=True)
print(f"Files copied successfully to {result_dir}.")
archive_name = f"{os.path.dirname(result_dir)}/{dirToZip}.7z"
print(f"Starting to create archive {archive_name}...")
with py7zr.SevenZipFile(archive_name, mode='w') as z:
z.writeall(result_dir, f"legacy-{dirToZip}")
z.writeall(result_dir, f"legacy-{dirToZip.lower()}")
print(f"Archive {archive_name} created successfully.")
return archive_name

Expand Down

0 comments on commit ca75620

Please sign in to comment.