Template:Version2: Difference between revisions

From Citizens Wiki

No edit summary
No edit summary
Line 1: Line 1:
54<noinclude>
<?php
==Documentation==
$jnksUrl = "http://ci.citizensnpcs.net";
'''DO NOT EDIT THIS PAGE! This page is the template for the Citizens2 version number. It should be kept up-to-date with the latest stable release.</noinclude>
$jnksJob = "Citizens2";
 
// No configuration required below.
$contents = @file_get_contents($jnksUrl . "/job/" . $jnksJob . "/lastSuccessfulBuild/");
$matches = array();
$match = preg_match('/\<title\>[A-Za-z0-9-_]+ \#([0-9]+) \[Jenkins\]\<\/title\>/i', $contents, $matches);
if ($match == 0) exit;
print $matches[1];
exit;

Revision as of 14:31, 19 February 2012

<?php $jnksUrl = "http://ci.citizensnpcs.net"; $jnksJob = "Citizens2";

// No configuration required below. $contents = @file_get_contents($jnksUrl . "/job/" . $jnksJob . "/lastSuccessfulBuild/"); $matches = array(); $match = preg_match('/\<title\>[A-Za-z0-9-_]+ \#([0-9]+) \[Jenkins\]\<\/title\>/i', $contents, $matches); if ($match == 0) exit; print $matches[1]; exit;