From 38ab941b294ee3cd84b5194190dfba8a1302a1b1 Mon Sep 17 00:00:00 2001 From: Frederic Marchal Date: Sun, 21 Sep 2014 16:00:37 +0200 Subject: [PATCH] Check the release date when archiving the project The release date is in the cmake script and in the source code. The script to package sarg now check that the two dates are identical. Conflicts: archive.sh --- archive.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/archive.sh b/archive.sh index d3799a1..78d006c 100755 --- a/archive.sh +++ b/archive.sh @@ -38,6 +38,23 @@ if [ "x$Version" != "x$ConfigureCheck" ] ; then exit 1 fi +# Check release date +ReleaseDate=$(sed -n -e 's/^SET(sarg_BUILDDATE "\([A-Z][a-z][a-z]-[0-3][0-9]-2[0-1][0-9][0-9]\)")/\1/p' "$Sources/CMakeLists.txt") +if [ -z "$ReleaseDate" ] ; then + echo "No release date found or release date is invalide in CMakeLists.txt" + exit 1 +fi + +ReleaseDateCheck=$(sed -n -e 's/^#define VERSION PACKAGE_VERSION" \([A-Z][a-z][a-z]-[0-3][0-9]-2[0-1][0-9][0-9]\)"/\1/p' "$Sources/include/info.h") +if [ -z "$ReleaseDateCheck" ] ; then + echo "No release date found or release date is invalide in include/info.h" + exit 1 +fi +if [ "x$ReleaseDate" != "x$ReleaseDateCheck" ] ; then + echo "CMakeLists and include/info.h doesn't refer to the same release date" + exit 1 +fi + # update the po files if ( ! make update-po ) ; then echo "Failed to update the po files" -- 2.47.2