diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-02-25 13:49:03 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2019-03-05 15:10:33 +0100 |
commit | 2bbef581530167c1011a40cb3285141e012ae7be (patch) | |
tree | 43241a1a1ffe06a9e670633588f9609b30254016 /build | |
parent | 36c750ae1e65c4e5770457cbf4d49543a38c0a3c (diff) | |
download | nextcloud-server-2bbef581530167c1011a40cb3285141e012ae7be.tar.gz nextcloud-server-2bbef581530167c1011a40cb3285141e012ae7be.zip |
Add test for updated CA bundle
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'build')
-rwxr-xr-x | build/ca-bundle-checker.sh | 22 |
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 |