diff --git a/scripts/analysis/detectWrongSettings.sh b/scripts/analysis/detectWrongSettings.sh index f583319c3e..473635c6dd 100755 --- a/scripts/analysis/detectWrongSettings.sh +++ b/scripts/analysis/detectWrongSettings.sh @@ -8,10 +8,10 @@ snapshotCount=$(./gradlew dependencies | grep SNAPSHOT -c) betaCount=$(grep "true" app/src/main/res/values/setup.xml -c) libraryHash=$(grep androidLibraryVersion build.gradle | cut -d= -f2 | tr -d \") -target=$(curl https://api.github.com/repos/nextcloud/android-library/commits/$libraryHash/pulls | jq ".[] .base.ref") -merged_at=$(curl https://api.github.com/repos/nextcloud/android-library/commits/$libraryHash/pulls | jq ".[] .merged_at") +target=$(curl https://api.github.com/repos/nextcloud/android-library/commits/$libraryHash/pulls | jq ".[] .base.ref" | tr -d \") +merged_at=$(curl https://api.github.com/repos/nextcloud/android-library/commits/$libraryHash/pulls | jq ".[] .merged_at" | tr -d\") -if [[ $target != "master" ]] -o [[ $merget_at == "null" ]]; then +if [[ $target != "master" ]] -o [[ -z $merget_at ]]; then echo "Library commit wrong!" exit 1 fi