summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-18 13:29:51 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-18 13:29:51 +0100
commitfc4006ce877231f63a941eca903c0af9416e8ab8 (patch)
tree2f46e2454f9440a34cbf18aa1c3a707dc9dc6dfd /include
parent962902a1c4a0b3b9ce942980f42311528d4a4398 (diff)
init.sh: move xbmk_set_version
it's called before set_pyver, so move it above that Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rw-r--r--include/init.sh30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/init.sh b/include/init.sh
index 49193f0f..35512469 100644
--- a/include/init.sh
+++ b/include/init.sh
@@ -121,6 +121,21 @@ xbmk_set_env()
xbmk_set_pyver
}
+xbmk_set_version()
+{
+ version_="$version"
+ [ ! -e ".git" ] || version="$(git describe --tags HEAD 2>&1)" || \
+ version="git-$(git rev-parse HEAD 2>&1)" || version="$version_"
+ versiondate_="$versiondate"
+ [ ! -e ".git" ] || versiondate="$(git show --no-patch --no-notes \
+ --pretty='%ct' HEAD)" || versiondate="$versiondate_"
+
+ chkvars version versiondate
+ update_xbmkver "."
+
+ relname="$projectname-$version"
+}
+
xbmk_set_pyver()
{
pyv="import sys; print(sys.version_info[:])"
@@ -180,21 +195,6 @@ xbmk_lock()
touch "$xbmklock" || err "cannot create '$xbmklock'"; :
}
-xbmk_set_version()
-{
- version_="$version"
- [ ! -e ".git" ] || version="$(git describe --tags HEAD 2>&1)" || \
- version="git-$(git rev-parse HEAD 2>&1)" || version="$version_"
- versiondate_="$versiondate"
- [ ! -e ".git" ] || versiondate="$(git show --no-patch --no-notes \
- --pretty='%ct' HEAD)" || versiondate="$versiondate_"
-
- chkvars version versiondate
- update_xbmkver "."
-
- relname="$projectname-$version"
-}
-
xbmk_git_init()
{
for gitarg in "--global user.name" "--global user.email"; do