summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIvan Zorin <[email protected]>2023-08-07 02:05:56 +0300
committerGitHub <[email protected]>2023-08-07 09:05:56 +1000
commit15ab87f3bcbc6be34bbe408d4809327f4cd114c1 (patch)
tree34252f5a1a183c50ec01bb4651c7a8cf20dfa3a3
parent8b90666f305cd9b434a4d25690da8bea1937186d (diff)
downloadIronOS-15ab87f3bcbc6be34bbe408d4809327f4cd114c1.tar.gz
IronOS-15ab87f3bcbc6be34bbe408d4809327f4cd114c1.zip
Update tagging for detached commit case & update docs (#1783)
make_translation.py: update tagging for detached commit case & update docs
-rw-r--r--Documentation/DebugMenu.md1
-rwxr-xr-xTranslations/make_translation.py10
2 files changed, 9 insertions, 2 deletions
diff --git a/Documentation/DebugMenu.md b/Documentation/DebugMenu.md
index bd25c9be..1b40ad78 100644
--- a/Documentation/DebugMenu.md
+++ b/Documentation/DebugMenu.md
@@ -22,6 +22,7 @@ There is a static line on top which is presented on every sub-screen and reflect
- T - git-related release **t**ag but version is not vXX.YY !
- D - git-related **d**ev branch
- B - git-related custom **b**ranch
+ - E - git-related from d**e**tached commit
- G - neither above but **g**it-related
- C - build from github **C**I during _pull request_
- H - build outside of a git tree (i.e. release tarball or **h**omebrew customization without git)
diff --git a/Translations/make_translation.py b/Translations/make_translation.py
index 0c53f8b8..752deaf6 100755
--- a/Translations/make_translation.py
+++ b/Translations/make_translation.py
@@ -1278,8 +1278,14 @@ def get_version_suffix(ver) -> str:
sha_id = f"{subprocess.check_output(['git', 'rev-parse', '--short=8', 'HEAD']).strip().decode('ascii').upper()}"
## - if the exact commit relates to tag, then this command should return one-line tag name:
tag = f"{subprocess.check_output(['git', 'tag', '--points-at', '%s' % sha_id]).strip().decode('ascii')}"
- ## - get short "traditional" branch name (as in `git branch` for that one with asterisk):
- branch = f"{subprocess.check_output(['git', 'symbolic-ref', '--short', 'HEAD']).strip().decode('ascii')}"
+ if (
+ f"{subprocess.check_output(['git', 'rev-parse', '--symbolic-full-name', '--short', 'HEAD']).strip().decode('ascii')}"
+ == "HEAD"
+ ):
+ return "E" + "." + sha_id
+ else:
+ ## - get short "traditional" branch name (as in `git branch` for that one with asterisk):
+ branch = f"{subprocess.check_output(['git', 'symbolic-ref', '--short', 'HEAD']).strip().decode('ascii')}"
if tag and "" != tag:
# _Speculate_ on tag that it's Release...
if ver == tag: