[2.1.0] Implement Ruby.
[htmlpurifier.git] / release2-strict.php
blob51e8aa989f1587c4c8b7b10650edd00b301b2d1a
1 <?php
3 // Merges in changes from trunk to strict branch
4 // WORKING COPY MUST BE POINTED TO STRICT BRANCH
6 if (php_sapi_name() != 'cli') {
7 echo 'Release script cannot be called from web-browser.';
8 exit;
11 require 'svn.php';
13 $svn_info = svn_info('.');
15 $last_rev = (int) $svn_info['Last Changed Rev'];
16 $trunk_url = $svn_info['Repository Root'] . '/htmlpurifier/trunk';
17 echo "Last revision was $last_rev, merging from $last_rev to head.\n";
19 $merge_cmd = "svn merge -r $last_rev:HEAD $trunk_url .";
20 $out = explode("\n", shell_exec($merge_cmd));
22 echo "Conflicted files:\n";
23 foreach ($out as $line) {
24 if (empty($line)) continue;
25 if ($line{0} === 'C' || $line{1} === 'C') echo $line . "\n";
28 $version = trim(file_get_contents('VERSION'));
29 echo "Resolve conflicts and then commit as 'Release $version, merged in $last_rev to HEAD.'";