From ab34c43b020ef3909c75f7b3d1cb88d1c8669c22 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 10 Jun 2024 08:56:18 +0200 Subject: [PATCH] first pull, then check Signed-off-by: tobiasKaminsky --- scripts/updateLibraryHash.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/updateLibraryHash.sh b/scripts/updateLibraryHash.sh index 86c1a7a677..7500b834f5 100755 --- a/scripts/updateLibraryHash.sh +++ b/scripts/updateLibraryHash.sh @@ -4,13 +4,13 @@ # SPDX-FileCopyrightText: 2024 Tobias Kaminsky # SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only -latestCommit=$(curl -s https://api.github.com/repos/nextcloud/android-library/commits/master | jq .sha | sed s'/\"//g') -currentCommit=$(grep "androidLibraryVersion" build.gradle | cut -f2 -d'"') - git fetch git checkout master git pull +latestCommit=$(curl -s https://api.github.com/repos/nextcloud/android-library/commits/master | jq .sha | sed s'/\"//g') +currentCommit=$(grep "androidLibraryVersion" build.gradle | cut -f2 -d'"') + [[ $latestCommit == "$currentCommit" ]] && echo "Nothing to do. Commit is: $latestCommit" && exit # nothing to do git fetch