files/create.sql.php: Use git pull -f --rebase

This commit is contained in:
2024-01-31 11:45:57 +01:00
parent 9a31364d88
commit 5d2a46f140

View File

@ -11,7 +11,7 @@ $repo = "winzer/elwig-misc.git";
$url = "https://token:$token@git.necronda.net/$repo";
$schema_version = $_GET['v'];
shell_exec("cd .repos; git clone $url; cd elwig-misc; git checkout main; git pull");
shell_exec("cd .repos; git clone $url; cd elwig-misc; git checkout main; git pull -f --rebase");
if ($schema_version) {
$commit = shell_exec("cd .repos/elwig-misc; git log -p sql/v01/99.schema_version.sql | grep '+PRAGMA schema_version = ${schema_version}00;' -B 14 | head -n 1 | grep -oE '[^ ]+$'");