first pull, then check

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2024-06-10 08:56:18 +02:00
parent da2e495442
commit ab34c43b02
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -4,13 +4,13 @@
# SPDX-FileCopyrightText: 2024 Tobias Kaminsky <tobias@kaminsky.me> # SPDX-FileCopyrightText: 2024 Tobias Kaminsky <tobias@kaminsky.me>
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only # 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 fetch
git checkout master git checkout master
git pull 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 [[ $latestCommit == "$currentCommit" ]] && echo "Nothing to do. Commit is: $latestCommit" && exit # nothing to do
git fetch git fetch