Skip to content

Commit

Permalink
check library commit on correct branch
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <[email protected]>
  • Loading branch information
tobiasKaminsky authored and backportbot[bot] committed Jan 23, 2025
1 parent f2825ad commit a619bc3
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 a619bc3

Please sign in to comment.