Browse Source

always push lint results, either as new master or for PR/master commit

tobiasKaminsky 7 years ago
parent
commit
4c3b2e65a2
1 changed files with 9 additions and 4 deletions
  1. 9 4
      scripts/lint/lint-up-wrapper.sh

+ 9 - 4
scripts/lint/lint-up-wrapper.sh

@@ -17,15 +17,20 @@ returnValue=$?
 
 echo "Branch: $3"
 
-if [ $3 = "master" -a $returnValue -eq 0 ]; then
+if [ $3 = "master" -a $returnValue -ne 1 ]; 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
-elif [ $returnValue -eq 1 ]; then
-    if [ -e $6 ] ; then
+else
+    if [ -e $6 ]; then
         6="master-"$(date +%F)
     fi
     echo "New results at https://nextcloud.kaminsky.me/index.php/s/tXwtChzyqMj6I8v ->" $6.html
     curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/droneLogs/$6.html --upload-file build/reports/lint/lint.html
-    exit 1
+    
+    if [ $returnValue -eq 2 ]; then
+        exit 0
+    else
+        exit 1
+    fi  
 fi