summaryrefslogtreecommitdiffstats
path: root/.travis
diff options
context:
space:
mode:
authorPavlos Emm. Katsoulakis <paul@netdata.rocks>2019-08-25 12:21:37 +0300
committerPavlos Emm. Katsoulakis <paul@netdata.rocks>2019-08-25 12:21:37 +0300
commit71abb7b15a67db7a75f9d04a7132dc1d1b1ea57e (patch)
tree938e4b454bba24362a5b902de567236253366d96 /.travis
parent9781ca4fa390fbd248ae4ca3b532aee385814e9f (diff)
netdata/ci: [ci skip] Fix changelog modification time script
Diffstat (limited to '.travis')
-rwxr-xr-x.travis/check_changelog_last_modification.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/.travis/check_changelog_last_modification.sh b/.travis/check_changelog_last_modification.sh
index 2665c06279..d6f8a16396 100755
--- a/.travis/check_changelog_last_modification.sh
+++ b/.travis/check_changelog_last_modification.sh
@@ -1,7 +1,24 @@
#!/usr/bin/env bash
+#
+# This scriptplet validates nightlies age and notifies is if it gets too old
+#
+# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
+#
+# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
set -e
+# If we are not in netdata git repo, at the top level directory, fail
+TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
+CWD=$(git rev-parse --show-cdup || echo "")
+if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
+ echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository"
+ echo "Changelog age checker exited abnormally"
+ exit 1
+fi
+
+source tests/installer/slack.sh || echo "I could not load slack library"
+
LAST_MODIFICATION="$(git log -1 --pretty="format:%at" CHANGELOG.md)"
CURRENT_TIME="$(date +"%s")"
TWO_DAYS_IN_SECONDS=172800