From 636a8289f511a6e8661dfb9e535c3eb09ccfb186 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Thu, 23 Jan 2025 15:27:56 +0100 Subject: [PATCH] check library commit on correct branch Signed-off-by: tobiasKaminsky --- scripts/analysis/detectWrongSettings.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/analysis/detectWrongSettings.sh b/scripts/analysis/detectWrongSettings.sh index e52133937a45..9ec1943a786c 100755 --- a/scripts/analysis/detectWrongSettings.sh +++ b/scripts/analysis/detectWrongSettings.sh @@ -8,7 +8,8 @@ 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 \") -lastHashes=$(curl https://api.github.com/repos/nextcloud/android-library/commits | jq ".[] .sha" | head -n 10) +baseBranch="master" +lastHashes=$(curl "https://api.github.com/repos/nextcloud/android-library/commits?sha=$baseBranch" | jq ".[] .sha" | head -n 10) if [[ $(echo "$lastHashes" | grep -c $libraryHash) -ne 1 ]]; then echo "Library commit not within last 10 hashes, please rebase!"