meta-wayland/recipes-support/foot/foot/0001-generate-version.sh-dont-try-to-fetch-version-from-g.patch
2024-07-24 07:53:47 +02:00

46 lines
1.4 KiB
Diff

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
Upstream-Status: Inappropriate [oe-specific]
---
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