1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- define('INSTALLDIR', dirname(__DIR__));
- define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
- 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";
|