files/create.sql.php: Use git pull -f --rebase
This commit is contained in:
@ -11,7 +11,7 @@ $repo = "winzer/elwig-misc.git";
|
|||||||
$url = "https://token:$token@git.necronda.net/$repo";
|
$url = "https://token:$token@git.necronda.net/$repo";
|
||||||
$schema_version = $_GET['v'];
|
$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) {
|
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 '[^ ]+$'");
|
$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 '[^ ]+$'");
|
||||||
|
Reference in New Issue
Block a user