⌈⌋ ⎇ branch:  freshcode


Artifact [2ca26f4228]

Artifact 2ca26f4228a1188719ade88bba81ef6f62769b12:

  • File cron.daily/autoupdate.php — part of check-in [686e87487e] at 2015-03-24 18:23:10 on branch trunk — Updated stylesheet to use table-layout for #main/#sidebar split. Padding still needs work. (user: mario size: 899)

<?php
/**
 * api: freshcode
 * title: Autoupdate runner
 * description: Cron job for invoking autoupdates on per-project basis
 * version: 0.6.0
 * depends: curl
 * author: mario
 * license: AGPL
 * x-cron: 15 03 * * *
 * 
 *
 * Each project listing can contain:
 *   `autoupdate_module` = none | regex | github | sourceforge | releases.json
 *   `autoupdate_url` = http://...
 *   `autoupdate_regex` = "version=/.../ \n changes=/.../"
 *
 * This module tries to load the mentioned reference URLs, extract version
 * and changelog, scope/state and download link; then updates the database.
 *
 */

// run in cron context
chdir(dirname(__DIR__));
include("config.php");

// go
$_SESSION["submitter"] = "";
$run = new Autoupdate();
$run->debug = 3;
$run->msg_html = 0;
$run->all();
#print_r($run->test("regex", "linux"));
#print_r($run->test("regex", "php"));
#print_r($run->test("github", "pgweb"));