Rework everything

This commit is contained in:
2024-05-11 21:21:54 +02:00
parent 2ddeaf1bfa
commit 01f240cd57
13 changed files with 176 additions and 71 deletions

View File

@ -1,4 +1,6 @@
<?php
require "../.php/credentials.inc";
global $GITEA_TOKEN;
if ($_SERVER['PHP_AUTH_USER'] !== 'elwig' || $_SERVER['PHP_AUTH_PW'] !== 'ganzGeheim123!') {
header('Status: 401');
@ -6,9 +8,8 @@ if ($_SERVER['PHP_AUTH_USER'] !== 'elwig' || $_SERVER['PHP_AUTH_PW'] !== 'ganzGe
exit("401 Unauthorized :(\n");
}
$token = "[REDACTED]";
$repo = "winzer/elwig-misc.git";
$url = "https://token:$token@git.necronda.net/$repo";
$url = "https://token:$GITEA_TOKEN@git.necronda.net/$repo";
$schema_version = $_GET['v'];
shell_exec("cd .repos; git clone $url; cd elwig-misc; git checkout main; git pull -f --rebase");