netdata/ci: [ci skip] Fix changelog modification time script
Pavlos Emm. Katsoulakis committed
Aug 25, 2019 at 12:21 UTC
71abb7b15a67db7a75f9d04a7132dc1d1b1ea57e
1 file changed
+17
.travis/check_changelog_last_modification.sh
+17
@@ -1,7 +1,24 @@
1
#!/usr/bin/env bash
2
+#
3
+# This scriptplet validates nightlies age and notifies is if it gets too old
4
+#
5
+# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
6
+#
7
+# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
8
9
set -e
10
11
+# If we are not in netdata git repo, at the top level directory, fail
12
+TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
13
+CWD=$(git rev-parse --show-cdup || echo "")
14
+if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
15
+ echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository"
16
+ echo "Changelog age checker exited abnormally"
17
+ exit 1
18
+fi
19
+
20
+source tests/installer/slack.sh || echo "I could not load slack library"
21
+
22
LAST_MODIFICATION="$(git log -1 --pretty="format:%at" CHANGELOG.md)"
23
CURRENT_TIME="$(date +"%s")"
24
TWO_DAYS_IN_SECONDS=172800