Эх сурвалжийг харах

check if master branch, then always update master.html

tobiaskaminsky 7 жил өмнө
parent
commit
1ecb3185b8

+ 5 - 1
scripts/lint/getBranchName.sh

@@ -2,4 +2,8 @@
 
 # $1: username, $2: password/token, $3: pull request number
 
-curl 2>/dev/null -u $1:$2 https://api.github.com/repos/nextcloud/android/pulls/$3 | grep \"ref\": | grep -v master | cut -d"\"" -f4
+if [ -z $3 ] ; then
+    echo "master";
+else
+    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 - 1
scripts/lint/lint-up-wrapper.sh

@@ -10,7 +10,7 @@
 ruby scripts/lint/lint-up.rb $1 $2 $3
 
 returnValue=$?
-if [ $returnValue -eq 0 ]; then
+if [ $3 = "master" ]; then
     echo "New master at: https://nextcloud.kaminsky.me/index.php/s/tXwtChzyqMj6I8v"
     curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/droneLogs/master.html --upload-file build/reports/lint/lint.html
     exit 0