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:
@@ -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")
|
||||
)
|
||||
|
Reference in New Issue
Block a user