Use shutil to move files (supports cross-env moves)

This commit is contained in:
Paulius Gervė 2025-02-27 20:14:55 +02:00 committed by Paulius Gerve
parent 64180472e2
commit 17b528489b

View file

@ -22,6 +22,7 @@ import os
import sys
from dataclasses import dataclass
from typing import List
import shutil
# Constants
AVAILABLE_TARGETS = ["linux", "windows", "macos"]
@ -86,7 +87,7 @@ def run_build(target, arch):
# Move assets to dist
print('Assets:', ', '.join(builder.assets))
for asset in builder.assets:
os.rename(asset, f'dist/{asset}')
shutil.move(asset, f'dist/{asset}')
def main():