mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-07-11 00:37:48 -06:00
🔨 Simpler distinct firmware rename (#25957)
This commit is contained in:
parent
82ddd55a1a
commit
0ed46406d1
5 changed files with 8 additions and 21 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue