Branch added
This commit is contained in:
parent
87bcfa54ea
commit
79a357537b
2340 changed files with 100899 additions and 37798 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-FileCopyrightText: 2016 Tobias Kaminsky <tobias@kaminsky.me>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
|
||||
BRANCH=$1
|
||||
LOG_USERNAME=$2
|
||||
|
|
@ -11,13 +11,15 @@ BUILD_NUMBER=$4
|
|||
PR_NUMBER=$5
|
||||
|
||||
|
||||
stableBranch="stable-3.29"
|
||||
stableBranch="master"
|
||||
repository="android"
|
||||
|
||||
ruby scripts/analysis/lint-up.rb
|
||||
lintValue=$?
|
||||
|
||||
curl "https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.xml" -o "/tmp/$stableBranch.xml"
|
||||
[[ ! -e "/tmp/$stableBranch.xml" ]] && exit 1
|
||||
|
||||
ruby scripts/analysis/spotbugs-up.rb "$stableBranch"
|
||||
spotbugsValue=$?
|
||||
|
||||
|
|
@ -32,12 +34,12 @@ echo "Branch: $BRANCH"
|
|||
|
||||
if [ "$BRANCH" = $stableBranch ]; then
|
||||
echo "New spotbugs result for $stableBranch at: https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.html"
|
||||
curl -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/$stableBranch.html --upload-file app/build/reports/spotbugs/spotbugs.html
|
||||
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/$stableBranch.xml" --upload-file app/build/reports/spotbugs/gplayDebug.xml
|
||||
curl -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT https://nextcloud.kaminsky.me/remote.php/dav/files/${LOG_USERNAME}/$repository-findbugs/$stableBranch.html --upload-file app/build/reports/spotbugs/spotbugs.html
|
||||
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/dav/files/${LOG_USERNAME}/$repository-findbugs/$stableBranch.xml" --upload-file app/build/reports/spotbugs/gplayDebug.xml
|
||||
|
||||
if [ $lintValue -ne 1 ]; then
|
||||
echo "New lint result for $stableBranch at: https://www.kaminsky.me/nc-dev/$repository-lint/$stableBranch.html"
|
||||
curl -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/$repository-lint/$stableBranch.html --upload-file app/build/reports/lint/lint.html
|
||||
curl -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT https://nextcloud.kaminsky.me/remote.php/dav/files/${LOG_USERNAME}/$repository-lint/$stableBranch.html --upload-file app/build/reports/lint/lint.html
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
|
|
@ -45,10 +47,10 @@ else
|
|||
6=$stableBranch"-"$(date +%F)
|
||||
fi
|
||||
echo "New lint results at https://www.kaminsky.me/nc-dev/$repository-lint/${BUILD_NUMBER}.html"
|
||||
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/webdav/$repository-lint/${BUILD_NUMBER}.html" --upload-file app/build/reports/lint/lint.html
|
||||
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/dav/files/${LOG_USERNAME}/$repository-lint/${BUILD_NUMBER}.html" --upload-file app/build/reports/lint/lint.html
|
||||
|
||||
echo "New spotbugs results at https://www.kaminsky.me/nc-dev/$repository-findbugs/${BUILD_NUMBER}.html"
|
||||
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/webdav/$repository-findbugs/${BUILD_NUMBER}.html" --upload-file app/build/reports/spotbugs/spotbugs.html
|
||||
curl 2>/dev/null -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "https://nextcloud.kaminsky.me/remote.php/dav/files/${LOG_USERNAME}/$repository-findbugs/${BUILD_NUMBER}.html" --upload-file app/build/reports/spotbugs/spotbugs.html
|
||||
|
||||
# delete all old comments, starting with Codacy
|
||||
oldComments=$(curl_gh -X GET "https://api.github.com/repos/nextcloud/$repository/issues/${PR_NUMBER}/comments" | jq '.[] | select((.user.login | contains("github-actions")) and (.body | test("<h1>Codacy.*"))) | .id')
|
||||
|
|
@ -132,10 +134,6 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ $checkLibrary -eq 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! $lintValue -eq 2 ]; then
|
||||
exit $lintValue
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -2,14 +2,28 @@
|
|||
|
||||
# SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-FileCopyrightText: 2016 Tobias Kaminsky <tobias@kaminsky.me>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
|
||||
snapshotCount=$(./gradlew dependencies | grep SNAPSHOT | grep -v "com.github.nextcloud:android-library" -c)
|
||||
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 \")
|
||||
|
||||
if [[ $snapshotCount -eq 0 && $betaCount -eq 0 ]] ; then
|
||||
exit 0
|
||||
else
|
||||
baseBranch="master"
|
||||
lastHashes=$(curl "https://api.github.com/repos/nextcloud/android-library/commits?sha=$baseBranch" | jq ".[] .sha" | head -n 20)
|
||||
|
||||
if [[ $(echo "$lastHashes" | grep -c $libraryHash) -ne 1 ]]; then
|
||||
echo "Library commit not within last 10 hashes, please rebase!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $snapshotCount -gt 0 ]] ; then
|
||||
echo "Snapshot found in dependencies"
|
||||
exit 1
|
||||
fi
|
||||
if [[ $betaCount -gt 0 ]] ; then
|
||||
echo "Beta is set in setup.xml"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-FileCopyrightText: 2016 Tobias Kaminsky <tobias@kaminsky.me>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
|
||||
PR_NUMBER=$1
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
# SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-FileCopyrightText: 2016 Tobias Kaminsky <tobias@kaminsky.me>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
|
||||
# $1: username, $2: password/token, $3: pull request number
|
||||
|
||||
if [ -z $3 ] ; then
|
||||
echo "stable-3.29";
|
||||
echo "master";
|
||||
else
|
||||
curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"stable-3.29"' | cut -d"\"" -f4
|
||||
curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v '"master"' | cut -d"\"" -f4
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
DO NOT TOUCH; GENERATED BY DRONE
|
||||
<span class="mdl-layout-title">Lint Report: 3 errors and 69 warnings</span>
|
||||
<span class="mdl-layout-title">Lint Report: 11 errors and 47 warnings</span>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
# SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-FileCopyrightText: 2017 Jason Atwood
|
||||
# SPDX-FileCopyrightText: 2017 Tobias Kaminsky <tobias@kaminsky.me>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
|
||||
|
||||
Encoding.default_external = Encoding::UTF_8
|
||||
|
|
@ -61,7 +61,7 @@ end
|
|||
|
||||
# run Lint
|
||||
puts "running Lint..."
|
||||
system './gradlew clean lintGplayDebug 1>/dev/null'
|
||||
system './gradlew clean lintGplayDebug'
|
||||
|
||||
# confirm that Lint ran w/out error
|
||||
result = $?.to_i
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
~
|
||||
~ SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
||||
~ SPDX-FileCopyrightText: 2024 Andy Scherzinger <info@andy-scherzinger.de>
|
||||
~ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
-->
|
||||
<FindBugsFilter>
|
||||
<Match>
|
||||
|
|
@ -33,6 +33,7 @@
|
|||
<Or>
|
||||
<Class name="~.*\..*.*Factory" />
|
||||
<Class name="~.*\..*.*Factory_Impl" />
|
||||
<Class name="~.*\..*.*MembersInjector" />
|
||||
</Or>
|
||||
<Bug pattern="IICU_INCORRECT_INTERNAL_CLASS_USE" />
|
||||
</Match>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-FileCopyrightText: 2017 Jason Atwood
|
||||
# SPDX-FileCopyrightText: 2017 Tobias Kaminsky <tobias@kaminsky.me>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
|
||||
Encoding.default_external = Encoding::UTF_8
|
||||
Encoding.default_internal = Encoding::UTF_8
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
# SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-FileCopyrightText: 2017 Tobias Kaminsky <tobias@kaminsky.me>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
import argparse
|
||||
import defusedxml.ElementTree as ET
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
# SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-FileCopyrightText: 2017 Tobias Kaminsky <tobias@kaminsky.me>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
import argparse
|
||||
import defusedxml.ElementTree as ET
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue