12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
- require_once INSTALLDIR.'/scripts/commandline.inc';
- $base = INSTALLDIR;
- $encBase = escapeshellarg($base);
- $ver = GNUSOCIAL_VERSION;
- if (preg_match('/^(\d+)\.(\d+)\.(\d+)/', $ver, $matches)) {
- list(, $a, $b, $c) = $matches;
- if ($c > '0') {
- $cprime = $c - 1;
- $prev = "$a.$b.$cprime";
- } else {
- die("This is a .0 release; you need to provide a thingy.\n");
- }
- }
- $tag = $ver;
- $prefix = "statusnet-$tag";
- $target = "$prefix.tar.gz";
- $cmd = <<<END
- (cd $encBase && git archive --prefix=$prefix/ $tag | gzip > /tmp/$target) && \
- (cd /tmp && tar zxf $target && cd $prefix && make) && \
- (cd $encBase && git log --oneline {$prev}..{$tag} > /tmp/$prefix/Changelog) && \
- (cd /tmp && tar zcf $target $prefix) && \
- (cd /tmp && rm -rf $prefix) && \
- (mv /tmp/$target .)
- END;
- echo $cmd;
- echo "\n";
|