1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-10-15 11:26:40 +03:00

Tools - makecorever.py explicit output argument (#9248)

* Tools - makecorever.py explicit output argument

Don't hide where the file is actually placed
Using pathlib instead of raw strings to simplify path ops
Plus, add stdout preview when output is missing

Clean-up git-describe <-> version availility checks

* typo

* fix unhandled exc in git cmd

* unused escape

* RELEASE using same values
This commit is contained in:
Max Prokhorov
2025-05-27 06:55:03 +03:00
committed by GitHub
parent 30780cb8c9
commit 4214e16671
5 changed files with 131 additions and 70 deletions

View File

@@ -409,18 +409,20 @@ def platform_txt_version(default):
if isdir(join(FRAMEWORK_DIR, ".git")):
cmd = '"$PYTHONEXE" "{script}" -b "$BUILD_DIR" -p "{framework_dir}" -v {version}'
out = join("$BUILD_DIR", "core", "core_version.h")
cmd = '"$PYTHONEXE" "{script}" --git-root "{framework_dir}" --version {version} "$TARGET"'
fmt = {
"script": join(FRAMEWORK_DIR, "tools", "makecorever.py"),
"framework_dir": FRAMEWORK_DIR,
"version": platform_txt_version("unspecified")
"version": platform_txt_version("unspecified"),
}
env.Prepend(CPPPATH=[
join("$BUILD_DIR", "core")
])
core_version = env.Command(
join("$BUILD_DIR", "core", "core_version.h"),
out,
join(FRAMEWORK_DIR, ".git"),
env.VerboseAction(cmd.format(**fmt), "Generating $TARGET")
)