⚡ check version script adaptated from the framadate tool to monitor chapril date service
This commit is contained in:
parent
2d44eef914
commit
ac4e6cfcef
@ -26,14 +26,14 @@ else
|
|||||||
lastVersion=$(curl -s https://framagit.org/api/v4/projects/$FRAMAGIT_PROJECT_ID/releases | jshon -a -e name|cut -d '"' -f2|grep -v '[\^\(alpha\)]'|head -n 1)
|
lastVersion=$(curl -s https://framagit.org/api/v4/projects/$FRAMAGIT_PROJECT_ID/releases | jshon -a -e name|cut -d '"' -f2|grep -v '[\^\(alpha\)]'|head -n 1)
|
||||||
currentVersion=$(cd $LOCAL_REPO && git branch | grep '*'|cut -c 11-100 )
|
currentVersion=$(cd $LOCAL_REPO && git branch | grep '*'|cut -c 11-100 )
|
||||||
|
|
||||||
echo "current version: $currentVersion"
|
# echo "current version: $currentVersion"
|
||||||
echo "last version: $lastVersion"
|
# echo "last version: $lastVersion"
|
||||||
if [ $currentVersion = $lastVersion ]; then
|
if [ $currentVersion == $lastVersion ]; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
result=0
|
result=0
|
||||||
else
|
else
|
||||||
echo "WARNING : new version available, current is $currentVersion, last is $lastVersion."
|
echo "WARNING : new version available, current is $currentVersion, last is $lastVersion."
|
||||||
result=1
|
result=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
exit $result
|
exit $result
|
||||||
|
Loading…
Reference in New Issue
Block a user