[evolution-data-server/wip/cmake] Enhance DistTargets
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/wip/cmake] Enhance DistTargets
- Date: Wed, 5 Oct 2016 12:15:22 +0000 (UTC)
commit 966414986c0825f91faf39095d0b6ce60f50e9fa
Author: Milan Crha <mcrha redhat com>
Date: Wed Oct 5 14:15:49 2016 +0200
Enhance DistTargets
cmake/modules/DistTargets.cmake | 1 +
cmake/verify-news-file.sh | 21 +++++++++++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/cmake/modules/DistTargets.cmake b/cmake/modules/DistTargets.cmake
index 029f782..2551d3a 100644
--- a/cmake/modules/DistTargets.cmake
+++ b/cmake/modules/DistTargets.cmake
@@ -54,6 +54,7 @@ add_custom_command(OUTPUT ${disttest_build_dir}/Makefile
COMMAND ${CMAKE_COMMAND} -E chdir ${disttest_build_dir} make -j
DEPENDS dist
+ COMMENT "Building from distribution tarball ${ARCHIVE_FULL_NAME}..."
)
add_custom_target(distcheck
diff --git a/cmake/verify-news-file.sh b/cmake/verify-news-file.sh
index 3ac8099..98d8191 100755
--- a/cmake/verify-news-file.sh
+++ b/cmake/verify-news-file.sh
@@ -7,6 +7,8 @@
#
# The date is expected in a form of YYYY-MM-DD of the current local time.
# The NEWS line is in form of "PROJECTNAME VERSION DATE".
+#
+# The test can be skipped entirely when SKIP_NEWS_FILE_TEST=1 is set.
FILENAME=$1
EXPVERSION=$2
@@ -27,13 +29,28 @@ EXPDATE=`date +%Y-%m-%d`
NEWSVERSION="${NEWSLINE#* }"
NEWSDATE="${NEWSVERSION#* }"
NEWSVERSION="${NEWSVERSION% *}"
+SUCCESS=1
if [ "$NEWSVERSION" != "$EXPVERSION" ]; then
echo "Read NEWS version '$NEWSVERSION' doesn't match expected version '$EXPVERSION'" 1>&2
- exit 1
+ SUCCESS=0
fi
if [ "$NEWSDATE" != "$EXPDATE" ]; then
- echo "Read NEWS date '$NEWSDATE' doesn't match expected version '$EXPDATE'" 1>&2
+ echo "Read NEWS date '$NEWSDATE' doesn't match expected date '$EXPDATE'" 1>&2
+ SUCCESS=0
+fi
+
+if [ "$SUCCESS" != "1" ]; then
+ if [ "$SKIP_NEWS_FILE_TEST" = "1" ]; then
+ echo "" 1>&2
+ echo "****************************************************************" 1>&2
+ echo "* Failed NEWS file test ignored due to SKIP_NEWS_FILE_TEST=1 *" 1>&2
+ echo "****************************************************************" 1>&2
+ echo "" 1>&2
+ exit 0
+ else
+ echo "(This test can be skipped when SKIP_NEWS_FILE_TEST=1 is set.)" 1>&2
+ fi
exit 1
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]