mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #3772 from nextcloud/check500charLimit
Check for 500 char limit
This commit is contained in:
commit
4cb11f4ccf
2 changed files with 26 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#1: GIT_USERNAME
|
||||
#2: GIT_TOKEN
|
||||
|
@ -110,7 +110,18 @@ else
|
|||
findbugsMessage="<h1>Findbugs increased!</h1>"
|
||||
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
|
||||
exit 1
|
||||
|
|
13
scripts/checkGplayLimitation.sh
Executable file
13
scripts/checkGplayLimitation.sh
Executable 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";
|
Loading…
Reference in a new issue