mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-12-19 15:14:28 +03:00
36 lines
972 B
Bash
Executable file
36 lines
972 B
Bash
Executable file
#!/bin/sh
|
|
|
|
#1: GIT_USERNAME
|
|
#2: GIT_TOKEN
|
|
#3: BRANCH
|
|
#4: LOG_USERNAME
|
|
#5: LOG_PASSWORD
|
|
#6: DRONE_BUILD_NUMBER
|
|
|
|
ruby scripts/lint/lint-up.rb $1 $2 $3
|
|
returnValue=$?
|
|
|
|
# exit codes:
|
|
# 0: count was reduced
|
|
# 1: count was increased
|
|
# 2: count stayed the same
|
|
|
|
echo "Branch: $3"
|
|
|
|
if [ $3 = "master" -a $returnValue -ne 1 ]; then
|
|
echo "New master at: https://nextcloud.kaminsky.me/index.php/s/fyxdQjc7LCiy57C"
|
|
curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/talk-droneLogs/master.html --upload-file app/build/reports/lint/lint.html
|
|
exit 0
|
|
else
|
|
if [ -e $6 ]; then
|
|
6="master-"$(date +%F)
|
|
fi
|
|
echo "New results at https://nextcloud.kaminsky.me/index.php/s/fyxdQjc7LCiy57C ->" $6.html
|
|
curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/talk-droneLogs/$6.html --upload-file app/build/reports/lint/lint.html
|
|
|
|
if [ $returnValue -eq 2 ]; then
|
|
exit 0
|
|
else
|
|
exit $returnValue
|
|
fi
|
|
fi
|