exclude rc versions from upgrade check

This commit is contained in:
Tykayn 2021-08-19 14:38:35 +02:00 committed by tykayn
parent fed23af3d4
commit 3bcbae2ca7
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ function usage() {
if [ "$#" -ne 0 ]; then if [ "$#" -ne 0 ]; then
usage usage
else 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 > /tmp/listOfVersions.txt && sed -i -e "/rc/d" /tmp/listOfVersions.txt && cat /tmp/listOfVersions.txt |cut -d '"' -f2|grep -v '[\^\(alpha\)]'|head -n 1)
currentVersion=$(cd $LOCAL_REPO && git describe --exact-match --tags $(git log -n1 --pretty='%h') |cut -c 9-100 ) currentVersion=$(cd $LOCAL_REPO && git describe --exact-match --tags $(git log -n1 --pretty='%h') |cut -c 9-100 )
# le tag se nomme ainsi "chapril-1.0.2" donc pour comparer uniquement les numéros de version on enlève le début du nom # le tag se nomme ainsi "chapril-1.0.2" donc pour comparer uniquement les numéros de version on enlève le début du nom

View File

@ -12,7 +12,7 @@ echo " "
cd LOCAL_REPO cd LOCAL_REPO
git fetch --tags git fetch --tags
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 > /tmp/listOfVersions.txt && sed -i -e "/rc/d" /tmp/listOfVersions.txt && cat /tmp/listOfVersions.txt |cut -d '"' -f2|grep -v '[\^\(alpha\)]'|head -n 1)
currentVersion=$(cd $LOCAL_REPO && git branch | grep '*'|cut -c 3-100 ) currentVersion=$(cd $LOCAL_REPO && git branch | grep '*'|cut -c 3-100 )
if [ $currentVersion = $lastVersion ]; then if [ $currentVersion = $lastVersion ]; then
echo " " echo " "