Sfoglia il codice sorgente

Editing the autoupdater thingie

Andrea Franceschini 8 anni fa
parent
commit
2387ab5f11
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      pages/api/git-update.php

+ 6 - 1
pages/api/git-update.php

@@ -1,5 +1,10 @@
 <?php
 
 $data = json_decode(file_get_contents('php://input'));
+$secret = $data['secret'];
 
-print_r($data);
+$url = 'http://git.morpheu5.net/api/v1/morpheu5/af/archive/master.tar.gz';
+
+$cmd = 'curl -L -H "Authorization: token ' . $secret . '" ' . $url . ' > master.tar.gz';
+
+system($cmd);