🐛 Fixes for ProUI, build rename (#26177)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user