mirror of
https://github.com/boostorg/boost-tasks.git
synced 2026-02-01 08:22:13 +00:00
30 lines
883 B
PHP
Executable File
30 lines
883 B
PHP
Executable File
#!/usr/bin/php
|
|
<?php
|
|
|
|
require_once(__DIR__.'/vendor/autoload.php');
|
|
CommandLineOptions::cron_job();
|
|
|
|
// Quick and dirty check if the configuration has changed since last run.
|
|
$settings = \Nette\Neon\Neon::encode(EvilGlobals::safe_settings(), \Nette\Neon\Neon::BLOCK);
|
|
$record = R::findOne('variable', 'name = "settings"');
|
|
if (!$record || $settings !== $record->value) {
|
|
echo "Configuration updated:\n\n{$settings}";
|
|
|
|
if (!$record) {
|
|
$record = R::dispense('variable');
|
|
$record->name = 'settings';
|
|
}
|
|
$record->value = $settings;
|
|
$record->updated_on = R::isoDateTime();
|
|
R::store($record);
|
|
|
|
$history = R::dispense('history');
|
|
$history->name = $record->name;
|
|
$history->value = $record->value;
|
|
$history->updated_on = $record->updated_on;
|
|
R::store($history);
|
|
}
|
|
|
|
GitHubEventQueue::downloadEvents();
|
|
SuperProject::updateBranches();
|