From 378dc9123a1868f11986c9520aa9885b534049ac Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Mon, 18 Nov 2024 21:36:41 +0100 Subject: [PATCH] git_version_gen: Just print the version This was needed because we #included it in C++, but now it's easier to have just the version in there --- build_tools/git_version_gen.sh | 8 ++++---- cmake/Install.cmake | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build_tools/git_version_gen.sh b/build_tools/git_version_gen.sh index 0cbd3c693..fde954793 100755 --- a/build_tools/git_version_gen.sh +++ b/build_tools/git_version_gen.sh @@ -53,16 +53,16 @@ fi if test -r "$FBVF" then - VC=$(grep -v '^#' "$FBVF" | tr -d '"' | sed -e 's/^FISH_BUILD_VERSION=//') + VC=$(cat "$FBVF") else VC="unset" fi # Maybe output the FBVF -# It looks like FISH_BUILD_VERSION="2.7.1-621-ga2f065e6" +# It looks like "2.7.1-621-ga2f065e6" test "$VN" = "$VC" || { - echo >&2 "FISH_BUILD_VERSION=$VN" - echo "FISH_BUILD_VERSION=\"$VN\"" >"$FBVF" + echo >&2 "$VN" + echo "$VN" >"$FBVF" } # Output the fish-build-version-witness.txt diff --git a/cmake/Install.cmake b/cmake/Install.cmake index 16025801d..2d8012c6d 100644 --- a/cmake/Install.cmake +++ b/cmake/Install.cmake @@ -106,7 +106,7 @@ configure_file(fish.pc.in fish.pc.noversion @ONLY) add_custom_command(OUTPUT fish.pc COMMAND sed '/Version/d' fish.pc.noversion > fish.pc COMMAND printf "Version: " >> fish.pc - COMMAND sed 's/FISH_BUILD_VERSION=//\;s/\"//g' ${FBVF} >> fish.pc + COMMAND cat ${FBVF} >> fish.pc WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS CHECK-FISH-BUILD-VERSION-FILE ${CMAKE_CURRENT_BINARY_DIR}/fish.pc.noversion)