Skip to content

Commit

Permalink
Merge pull request #14455 from nextcloud/checkWrongSettingsOnCorrectB…
Browse files Browse the repository at this point in the history
…ranch

check library commit on correct branch
  • Loading branch information
tobiasKaminsky authored Jan 23, 2025
2 parents 890464a + 636a828 commit bf8d42c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/analysis/detectWrongSettings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ snapshotCount=$(./gradlew dependencies | grep SNAPSHOT -c)
betaCount=$(grep "<bool name=\"is_beta\">true</bool>" 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!"
Expand Down

0 comments on commit bf8d42c

Please sign in to comment.