🔨 Simpler distinct firmware rename (#25957)

This commit is contained in:
Scott Lahteine 2023-06-09 02:56:25 -05:00 committed by GitHub
parent 82ddd55a1a
commit 0ed46406d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 21 deletions

View file

@ -60,6 +60,7 @@ if pioutil.is_pio_build():
def rename_target(source, target, env):
from pathlib import Path
Path(target[0].path).replace(Path(target[0].dir.path, new_name))
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'))))
marlin.add_post_action(rename_target)