scons fuckery

This commit is contained in:
VerstreuteSeele
2023-01-15 22:35:36 +01:00
parent f375a60555
commit a642bed2fc
4 changed files with 18 additions and 18 deletions
+9 -1
View File
@@ -40,7 +40,15 @@ class GitVersion:
os.environ.get("CUSTOM_FLIPPER_NAME", None)
or ""
)
force_no_dirty = (
os.environ.get("FORCE_NO_DIRTY", None)
or ""
)
if (force_no_dirty != ""):
dirty = False
if (custom_fz_name != "") and (len(custom_fz_name) <= 8) and (custom_fz_name.isalnum()) and (custom_fz_name.isascii()):
return {
"GIT_COMMIT": commit,
+6 -1
View File
@@ -106,6 +106,11 @@ vars.AddVariables(
"Replaces OTP flipper name with custom string of 8 chars",
"",
),
(
"FORCE_NO_DIRTY",
"Force disable dirty status of the build",
"",
),
(
"COPRO_CUBE_VERSION",
"Cube version",
@@ -242,4 +247,4 @@ vars.AddVariables(
),
)
Return("vars")
Return("vars")
+2 -1
View File
@@ -21,6 +21,7 @@ variables_to_forward = [
"WORKFLOW_BRANCH_OR_TAG",
"DIST_SUFFIX",
"CUSTOM_FLIPPER_NAME",
"FORCE_NO_DIRTY",
# Python & other tools
"HOME",
"APPDATA",
@@ -87,4 +88,4 @@ SetOption("max_drift", 1)
wrap_tempfile(coreenv, "LINKCOM")
wrap_tempfile(coreenv, "ARCOM")
Return("coreenv")
Return("coreenv")
+1 -15
View File
@@ -1,4 +1,3 @@
import os
from dataclasses import dataclass, field
from SCons.Node import NodeList
from SCons.Warnings import warn, WarningOnByDefault
@@ -110,25 +109,12 @@ if appsrc := appenv.subst("$APPSRC"):
app_artifacts = appenv.GetExtAppFromPath(appsrc)
appenv.PhonyTarget(
"launch_app",
'${PYTHON3} "${APP_RUN_SCRIPT}" --launch "${SOURCE}" --fap_dst_dir "/ext/apps/${FAP_CATEGORY}"',
'${PYTHON3} "${APP_RUN_SCRIPT}" "${SOURCE}" --fap_dst_dir "/ext/apps/${FAP_CATEGORY}"',
source=app_artifacts.compact,
FAP_CATEGORY=app_artifacts.app.fap_category,
)
appenv.Alias("launch_app", app_artifacts.validator)
appenv.PhonyTarget(
"faps_copy",
os.linesep.join(
[
'${PYTHON3} "${APP_RUN_SCRIPT}"'
f' "{app_artifact.compact[0].rstr()}"'
f' --fap_dst_dir "/ext/apps/{app_artifact.app.fap_category}"'
for app_artifact in appenv["EXT_APPS"].values()
]
),
source=["faps"],
)
# SDK management
sdk_origin_path = "${BUILD_DIR}/sdk_origin"