Merge pull request #3772 from nextcloud/check500charLimit

Check for 500 char limit
This commit is contained in:
Andy Scherzinger 2019-03-21 08:44:00 +01:00 committed by GitHub
commit 4cb11f4ccf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 2 deletions

View file

@ -1,4 +1,4 @@
#!/bin/sh #!/usr/bin/env bash
#1: GIT_USERNAME #1: GIT_USERNAME
#2: GIT_TOKEN #2: GIT_TOKEN
@ -110,7 +110,18 @@ else
findbugsMessage="<h1>Findbugs increased!</h1>" findbugsMessage="<h1>Findbugs increased!</h1>"
fi fi
curl -u $1:$2 -X POST https://api.github.com/repos/nextcloud/android/issues/$7/comments -d "{ \"body\" : \"$lintResult $findbugsResultNew $findbugsResultOld $checkLibraryMessage $lintMessage $findbugsMessage \" }" # check gplay limitation: all changelog files must only have 500 chars
gplayLimitation=$(scripts/checkGplayLimitation.sh)
if [ ! -z "$gplayLimitation" ]; then
gplayLimitation="<h1>Following files are beyond 500 char limit:</h1><br><br>"$gplayLimitation
fi
curl -u $1:$2 -X POST https://api.github.com/repos/nextcloud/android/issues/$7/comments -d "{ \"body\" : \"$lintResult $findbugsResultNew $findbugsResultOld $checkLibraryMessage $lintMessage $findbugsMessage $gplayLimitation \" }"
if [ ! -z "$gplayLimitation" ]; then
exit 1
fi
if [ $checkLibrary -eq 1 ]; then if [ $checkLibrary -eq 1 ]; then
exit 1 exit 1

13
scripts/checkGplayLimitation.sh Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
result=""
for log in fastlane/metadata/android/*/changelogs/*
do
if [[ -e $log && $(wc -m $log | cut -d" " -f1) -gt 500 ]]
then
result=$log"<br>"$result
fi
done
echo -e "$result";