11
11
def zip_directory (data ):
12
12
dirToZip , version = data
13
13
source_dir = f"packages/{ dirToZip } "
14
- result_dir = f"temp/{ source_dir } /v { version } "
14
+ result_dir = f"temp/{ source_dir } /legacy- { dirToZip } "
15
15
print (f"Starting to copy files from { source_dir } to { result_dir } ..." )
16
16
shutil .copytree (source_dir , result_dir , dirs_exist_ok = True )
17
17
print (f"Files copied successfully to { result_dir } ." )
18
18
archive_name = f"{ os .path .dirname (result_dir )} /{ dirToZip } .7z"
19
19
print (f"Starting to create archive { archive_name } ..." )
20
20
with py7zr .SevenZipFile (archive_name , mode = 'w' ) as z :
21
- z .writeall (result_dir , f"v { version } " )
21
+ z .writeall (result_dir , f"legacy- { dirToZip } " )
22
22
print (f"Archive { archive_name } created successfully." )
23
23
return archive_name
24
24
@@ -46,7 +46,7 @@ async def upload_release_asset(session, token, repo, tag_name, asset_path):
46
46
47
47
async def main (token , repo , tag_name ):
48
48
print ("Number of CPU cores available:" , os .cpu_count ())
49
-
49
+
50
50
dirs_to_process = os .listdir ("./packages" )
51
51
print (f"Found directories: { dirs_to_process } " )
52
52
zip_data = [prepare_zip_data (dir ) for dir in dirs_to_process ]
@@ -70,7 +70,7 @@ async def main(token, repo, tag_name):
70
70
parser .add_argument ("repo" , help = "Repository name, e.g., 'username/repo'" )
71
71
parser .add_argument ("tag_name" , help = "Tag name from the release" )
72
72
args = parser .parse_args ()
73
-
73
+
74
74
print ("Starting the upload process..." )
75
75
asyncio .run (main (args .token , args .repo , args .tag_name ))
76
76
print ("Upload process completed." )
0 commit comments