summaryrefslogtreecommitdiffstats
path: root/lib/python/qmk/cli/generate
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-03-18 16:02:24 +0000
committerGitHub <noreply@github.com>2022-03-18 16:02:24 +0000
commited773ab73cab83b842dc62ff94ffb337ec66a5f3 (patch)
tree9a731986f5a005370accac2f66047258d434d7c2 /lib/python/qmk/cli/generate
parente5823b56501598c39d3f57719cf32f344212ede6 (diff)
Relocate CLI git interactions (#16682)
Diffstat (limited to 'lib/python/qmk/cli/generate')
-rw-r--r--lib/python/qmk/cli/generate/version_h.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/python/qmk/cli/generate/version_h.py b/lib/python/qmk/cli/generate/version_h.py
index be9646748e..a75702c529 100644
--- a/lib/python/qmk/cli/generate/version_h.py
+++ b/lib/python/qmk/cli/generate/version_h.py
@@ -6,7 +6,7 @@ from milc import cli
from qmk.path import normpath
from qmk.commands import dump_lines
-from qmk.commands import get_git_version
+from qmk.git import git_get_version
from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE
TIME_FMT = '%Y-%m-%d-%H:%M:%S'
@@ -33,9 +33,9 @@ def generate_version_h(cli):
chibios_version = "NA"
chibios_contrib_version = "NA"
else:
- git_version = get_git_version(current_time)
- chibios_version = get_git_version(current_time, "chibios", "os")
- chibios_contrib_version = get_git_version(current_time, "chibios-contrib", "os")
+ git_version = git_get_version() or current_time
+ chibios_version = git_get_version("chibios", "os") or current_time
+ chibios_contrib_version = git_get_version("chibios-contrib", "os") or current_time
# Build the version.h file.
version_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#pragma once']