]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Check the release date when archiving the project
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Sun, 21 Sep 2014 14:00:37 +0000 (16:00 +0200)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Sun, 21 Sep 2014 14:00:37 +0000 (16:00 +0200)
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

index d3799a1b7e1febad7ed04b9e36901047669abd00..78d006c219e20ad187e3ff47616367ca673b1c38 100755 (executable)
@@ -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"