2023-06-13 09:52:48 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-03-29 18:56:51 +03:00
|
|
|
# SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
# SPDX-FileCopyrightText: 2016 Tobias Kaminsky <tobias@kaminsky.me>
|
2024-04-30 13:16:39 +03:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
2024-03-29 18:56:51 +03:00
|
|
|
|
2024-06-10 17:32:17 +03:00
|
|
|
snapshotCount=$(./gradlew dependencies | grep SNAPSHOT -c)
|
2023-06-13 09:52:48 +03:00
|
|
|
betaCount=$(grep "<bool name=\"is_beta\">true</bool>" app/src/main/res/values/setup.xml -c)
|
2024-06-11 08:38:22 +03:00
|
|
|
libraryHash=$(grep androidLibraryVersion build.gradle | cut -f2 -d'"' | grep "^[0-9a-zA-Z]\{40\}$" -c)
|
2023-06-13 09:52:48 +03:00
|
|
|
|
2024-06-10 17:32:17 +03:00
|
|
|
|
2024-06-11 08:27:33 +03:00
|
|
|
if [[ $snapshotCount -gt 0 ]] ; then
|
|
|
|
echo "Snapshot found in dependencies"
|
2023-06-13 09:52:48 +03:00
|
|
|
exit 1
|
|
|
|
fi
|
2024-06-11 08:27:33 +03:00
|
|
|
if [[ $betaCount -gt 0 ]] ; then
|
|
|
|
echo "Beta is set in setup.xml"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-06-11 08:38:22 +03:00
|
|
|
if [[ $libraryHash -eq 0 ]] ; then
|
2024-06-11 08:27:33 +03:00
|
|
|
echo "Library hash is wrong!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|
2023-06-13 09:52:48 +03:00
|
|
|
|