🐛 Fixes for ProUI, build rename (#26177)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
GHGiampy 2023-08-19 22:53:45 +02:00 committed by GitHub
parent 1d17c34e12
commit f7d5188b2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 61 additions and 39 deletions

View file

@ -61,6 +61,9 @@ if pioutil.is_pio_build():
def rename_target(source, target, env):
from pathlib import Path
from datetime import datetime
Path(target[0].path).replace(Path(target[0].dir.path, datetime.now().strftime(new_name.replace('{date}', '%Y%m%d').replace('{time}', '%H%M%S'))))
from os import path
_newpath = Path(target[0].dir.path, datetime.now().strftime(new_name.replace('{date}', '%Y%m%d').replace('{time}', '%H%M%S')))
Path(target[0].path).replace(_newpath)
env['PROGNAME'] = path.splitext(_newpath)[0]
marlin.add_post_action(rename_target)