<?php
$INC = dirname(__FILE__) . "/../inc";
require_once($INC . "/state.inc.php");
require_once($INC . "/sql.inc.php");
require_once($INC . "/struct.inc.php");
require_once($INC . "/fixes.inc.php");
$rg_util_debug = TRUE;
rg_log('rg_event_socket: ' . $rg_event_socket);
rg_sql_app("rg-tests");
$db = rg_sql_open($rg_sql);
if ($db === FALSE) {
rg_log("Cannot create a database (" . rg_sql_error() . ")!");
exit(1);
}
// Force debug by setting the settings
$r = rg_state_set($db, 'debug', '1');
if ($r === FALSE) {
rg_internal_error('Cannot set state (debug var)!');
exit(1);
}
if (isset($rg_no_db) && $rg_no_db)
return;
rg_log("Redo schema...");
$r = rg_sql_struct_update($db, 0);
if ($r !== TRUE) {
rg_log("Cannot create struct (" . rg_sql_error() . ")!");
exit(1);
}
$r = rg_fixes_update($db);
if ($r !== TRUE) {
rg_log("Cannot apply fixes!");
exit(1);
}
$r = rg_sql_struct_parts_update($db);
if ($r !== TRUE) {
rg_log('Cannot create parts: ' . rg_sql_error());
exit(1);
}
rg_log("common.php finished");
rg_log('');
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master