示例#1
0
/** Save stats to disk */
function save()
{
    global $stats;
    $branch = git_branch();
    $hash = git_hash();
    $dir = __DIR__;
    $base = "{$dir}/results/{$branch}-{$hash}";
    file_put_contents("{$base}.json", json_encode($stats, JSON_PRETTY_PRINT));
}
示例#2
0
/**
 * Get the repository version from the GIT hash or SVN revision
 *
 * @return int Revision number
 */
function getReposVersion()
{
    $gitDir = FLUX_ROOT . '/.git';
    $svnDir = FLUX_ROOT . '/.svn';
    if (is_dir($gitDir)) {
        return git_hash();
    } else {
        if (is_dir($svnDir)) {
            return svn_version();
        }
    }
}
示例#3
0
<?php

require_once 'Flux/Config.php';
require_once 'Flux/Error.php';
require_once 'Flux/Connection.php';
require_once 'Flux/LoginServer.php';
require_once 'Flux/CharServer.php';
require_once 'Flux/MapServer.php';
require_once 'Flux/Athena.php';
require_once 'Flux/LoginAthenaGroup.php';
require_once 'Flux/Addon.php';
require_once 'functions/git_hash.php';
// Get the SVN revision of the top-level directory (FLUX_ROOT).
define('FLUX_GITHASH', git_hash());
/**
 * The Flux class contains methods related to the application on the larger
 * scale. For the most part, it handles application initialization such as
 * parsing the configuration files and whatnot.
 */
class Flux
{
    /**
     * Current version.
     */
    const VERSION = '1.0.0';
    /**
     * Top-level revision.
     */
    const GITHASH = FLUX_GITHASH;
    /**
     * Application-specific configuration object.