mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-20 00:48:11 -07:00
ufbt: deploying sample ufbt automation for new apps; added source "ufbt -s env" for toolchain access (#2648)
This commit is contained in:
@@ -380,8 +380,9 @@ dist_env.Alias("vscode_dist", vscode_dist)
|
||||
# Creating app from base template
|
||||
|
||||
dist_env.SetDefault(FBT_APPID=appenv.subst("$APPID") or "template")
|
||||
app_template_dir = project_template_dir.Dir("app_template")
|
||||
app_template_dist = []
|
||||
for template_file in project_template_dir.Dir("app_template").glob("*"):
|
||||
for template_file in app_template_dir.glob("*"):
|
||||
dist_file_name = dist_env.subst(template_file.name)
|
||||
if template_file.name.endswith(".png"):
|
||||
app_template_dist.append(
|
||||
@@ -397,12 +398,13 @@ for template_file in project_template_dir.Dir("app_template").glob("*"):
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
AddPostAction(
|
||||
app_template_dist[-1],
|
||||
[
|
||||
Mkdir(original_app_dir.Dir("images")),
|
||||
Touch(original_app_dir.Dir("images").File(".gitkeep")),
|
||||
# scons' glob ignores .dot directories, so we need to copy .github manually
|
||||
Copy(original_app_dir.Dir(".github"), app_template_dir.Dir(".github")),
|
||||
],
|
||||
)
|
||||
dist_env.Precious(app_template_dist)
|
||||
@@ -440,3 +442,8 @@ else:
|
||||
raise UserError(f"Dolphin folder not found: {dolphin_src_dir}")
|
||||
|
||||
dist_env.PhonyTarget("dolphin_ext", Action(missing_dolphin_folder, None))
|
||||
|
||||
dist_env.PhonyTarget(
|
||||
"env",
|
||||
"@echo $( ${FBT_SCRIPT_DIR}/toolchain/fbtenv.sh $)",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user