xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
<root> / tests / common.php (017697b6c66b3296a978f798783326d1a9f48e50) (778B) (mode 100644) [raw]
<?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_sql_app("rg-tests");
$db = rg_sql_open($rg_sql);
if ($db === FALSE) {
	rg_log("Cannot create a database (" . rg_sql_error() . ")!");
	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_slaves_update($db);
if ($r !== TRUE) {
	rg_log("Cannot create slaves!");
	exit(1);
}

rg_log("common.php finished");

?>
Hints

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