Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-02-25 15:49:03 +0300
committerBackportbot <backportbot-noreply@rullzer.com>2019-03-05 19:14:44 +0300
commitd2e12d6aa71280b188461f3b794ba0e933abe574 (patch)
treea1436f923cbb69c3843e7c75caf7a606656e74a2 /build
parent30e9a17790a4ad2448973c788f2eeee17a000d30 (diff)
Add test for updated CA bundle
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'build')
-rwxr-xr-xbuild/ca-bundle-checker.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/build/ca-bundle-checker.sh b/build/ca-bundle-checker.sh
new file mode 100755
index 00000000000..a23d6257d58
--- /dev/null
+++ b/build/ca-bundle-checker.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+echo
+if [[ -n ${DRONE_BRANCH} && ! ${DRONE_BRANCH} =~ version\/noid\/.+ ]]; then
+ echo "Skip CA bundle check"
+ exit 0
+fi
+
+echo "Fetching latest ca-bundle.crt ..."
+curl -o resources/config/ca-bundle.crt https://curl.haxx.se/ca/cacert.pem
+
+echo
+outdated=$(git diff --name-only | grep "resources/config/ca-bundle.crt")
+if [ "${outdated}" = "resources/config/ca-bundle.crt" ]; then
+ echo "CA bundle is not up to date."
+ echo "Please run: bash build/ca-bundle-checker.sh"
+ echo "And commit the result"
+ exit 1
+fi
+
+echo "CA bundle is up to date."
+exit 0