foot: dont fetch version from git

This commit is contained in:
Markus Volk 2022-04-19 14:01:48 +02:00
parent e6a133286c
commit 3732caaeb4
2 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,44 @@
From bd6828df037d588c60a30f21fdb83780e8ad0966 Mon Sep 17 00:00:00 2001
From: Markus Volk <f_l_k@t-online.de>
Date: Tue, 19 Apr 2022 13:41:21 +0200
Subject: [PATCH] generate-version.sh: dont try to fetch version from git
---
generate-version.sh | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/generate-version.sh b/generate-version.sh
index a030d512..5114abe0 100755
--- a/generate-version.sh
+++ b/generate-version.sh
@@ -15,25 +15,8 @@ out_file=${3}
# echo "source directory: ${src_dir}"
# echo "output file: ${out_file}"
-if [ -d "${src_dir}/.git" ] && command -v git > /dev/null; then
- workdir=$(pwd)
- cd "${src_dir}"
-
- if git describe --tags > /dev/null 2>&1; then
- git_version=$(git describe --always --tags)
- else
- # No tags available, happens in e.g. CI builds
- git_version="${default_version}"
- fi
-
- git_branch=$(git rev-parse --abbrev-ref HEAD)
- cd "${workdir}"
-
- new_version="${git_version} ($(date "+%b %d %Y"), branch '${git_branch}')"
-else
- new_version="${default_version}"
- extra=""
-fi
+new_version="${default_version}"
+extra=""
major=$(echo "${new_version}" | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1/')
minor=$(echo "${new_version}" | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\2/')
--
2.25.1

View File

@ -19,7 +19,8 @@ DEPENDS = " \
RRECOMMENDS:${PN} = "ncurses-terminfo xdg-utils"
SRC_URI = " \
git://codeberg.org/dnkl/foot.git;protocol=https;branch=master \
git://codeberg.org/dnkl/foot.git;protocol=https;branch=releases/1.11 \
file://0001-generate-version.sh-dont-try-to-fetch-version-from-g.patch \
"
S = "${WORKDIR}/git"