Merge branch 'master' of gitops.sunet.se:eid-ops

This commit is contained in:
Leif Johansson 2020-09-18 16:33:41 +02:00
commit 54925abf1b
No known key found for this signature in database
GPG key ID: D73AD6430AD478D6

View file

@ -0,0 +1,21 @@
#!/bin/bash
#
URL=$1
VERSION=$2
JSONVERSION=$(curl -ksL $URL | jq .version 2> /dev/null | sed s/\"//g)
EXITCODE=$?
if [ $EXITCODE -ne 0 ]; then
echo "Could not get version from URL: $URL"
exit 2
fi
if [ "$VERSION" != "$JSONVERSION" ]; then
echo "Version missmatch, $JSONVERSION != $VERSION"
exit 1
fi
echo "OK - Version: $JSONVERSION"
exit 0