This commit is contained in:
Willy-JL
2023-03-02 02:52:25 +00:00
parent 8e5be2403b
commit 77eb733a9a
6 changed files with 45 additions and 80 deletions
+7 -5
View File
@@ -166,11 +166,13 @@ class Main(App):
)
)
bundle_args.extend(self.other_args)
log_custom_fz_name = (
environ.get("CUSTOM_FLIPPER_NAME", None)
or ""
)
if (log_custom_fz_name != "") and (len(log_custom_fz_name) <= 8) and (log_custom_fz_name.isalnum()) and (log_custom_fz_name.isascii()):
log_custom_fz_name = environ.get("CUSTOM_FLIPPER_NAME", None) or ""
if (
(log_custom_fz_name != "")
and (len(log_custom_fz_name) <= 8)
and (log_custom_fz_name.isalnum())
and (log_custom_fz_name.isascii())
):
self.logger.info(
f"Flipper Custom Name is set:\n\tName: {log_custom_fz_name} : length - {len(log_custom_fz_name)} chars"
)
+10 -15
View File
@@ -34,25 +34,20 @@ class GitVersion:
branch_num = self._exec_git("rev-list --count HEAD") or "n/a"
version = (
os.environ.get("DIST_SUFFIX", None)
or VERSION
or "unknown"
)
version = os.environ.get("DIST_SUFFIX", None) or VERSION or "unknown"
custom_fz_name = (
os.environ.get("CUSTOM_FLIPPER_NAME", None)
or ""
)
custom_fz_name = os.environ.get("CUSTOM_FLIPPER_NAME", None) or ""
force_no_dirty = (
os.environ.get("FORCE_NO_DIRTY", None)
or ""
)
if (force_no_dirty != ""):
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()):
if (
(custom_fz_name != "")
and (len(custom_fz_name) <= 8)
and (custom_fz_name.isalnum())
and (custom_fz_name.isascii())
):
return {
"GIT_COMMIT": commit,
"GIT_BRANCH": branch,