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)