Skip to content

Commit 3a43435

Browse files
Change spotless call
Signed-off-by: Andy Scherzinger <[email protected]>
1 parent 8c785d7 commit 3a43435

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed

scripts/analysis/analysis-wrapper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ echo "Branch: $BRANCH"
2929
if [ "$BRANCH" = $stableBranch ]; then
3030
echo "New spotbugs result for $stableBranch at: https://www.kaminsky.me/nc-dev/$repository-findbugs/$stableBranch.html"
3131
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
32-
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
32+
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/debug.xml
3333

3434
if [ $lintValue -ne 1 ]; then
3535
echo "New lint result for $stableBranch at: https://www.kaminsky.me/nc-dev/$repository-lint/$stableBranch.html"

scripts/analysis/spotbugs-up.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
require 'open3'
1515

1616
# run Spotbugs
17-
puts "running Spotbugs..."
18-
system './gradlew spotbugsGplayDebug 1>/dev/null 2>&1'
17+
puts "running Spotless..."
18+
system './gradlew spotlessCheck 1>/dev/null 2>&1'
1919

2020
# find number of warnings
2121
current_warning_count = `./scripts/analysis/spotbugsSummary.py --total`.to_i

scripts/lib.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Nextcloud Android Library is available under MIT license
4+
#
5+
# @author Álvaro Brey Vilas
6+
# Copyright (C) 2022 Álvaro Brey Vilas
7+
# Copyright (C) 2022 Nextcloud GmbH
8+
#
9+
# Permission is hereby granted, free of charge, to any person obtaining a copy
10+
# of this software and associated documentation files (the "Software"), to deal
11+
# in the Software without restriction, including without limitation the rights
12+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
# copies of the Software, and to permit persons to whom the Software is
14+
# furnished to do so, subject to the following conditions:
15+
#
16+
# The above copyright notice and this permission notice shall be included in
17+
# all copies or substantial portions of the Software.
18+
#
19+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
23+
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
24+
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26+
# THE SOFTWARE.
27+
#
28+
29+
## This file is intended to be sourced by other scripts
30+
31+
32+
function err() {
33+
echo >&2 "$@"
34+
}
35+
36+
37+
function curl_gh() {
38+
if [[ -n "$GITHUB_TOKEN" ]]
39+
then
40+
curl \
41+
--silent \
42+
--header "Authorization: token $GITHUB_TOKEN" \
43+
"$@"
44+
else
45+
err "WARNING: No GITHUB_TOKEN found. Skipping API call"
46+
fi
47+
48+
}

0 commit comments

Comments
 (0)