mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-22 21:30:54 +01:00
added "release" of files to download.stylite.de and other 1.8 improvments
This commit is contained in:
parent
7c038d6a85
commit
a1457d3599
@ -32,18 +32,20 @@ $config = array(
|
|||||||
'extra' => array('stylite','jdots','$egwbase/$svnbranch/egw-pear','$egwbase/$svnbranch/gallery','$egwbase/$svnbranch/phpfreechat','svn+ssh://stylite@svn.stylite.de/stylite/trunk/eventmgr'),
|
'extra' => array('stylite','jdots','$egwbase/$svnbranch/egw-pear','$egwbase/$svnbranch/gallery','$egwbase/$svnbranch/phpfreechat','svn+ssh://stylite@svn.stylite.de/stylite/trunk/eventmgr'),
|
||||||
'types' => array('tar.bz2','tar.gz','zip'),
|
'types' => array('tar.bz2','tar.gz','zip'),
|
||||||
'svn' => '/usr/bin/svn',
|
'svn' => '/usr/bin/svn',
|
||||||
|
'rsync' => 'rsync --progress -e "ssh -P 9922"',
|
||||||
'clamscan' => '/usr/bin/clamscan',
|
'clamscan' => '/usr/bin/clamscan',
|
||||||
'freshclam' => '/usr/bin/freshclam',
|
'freshclam' => '/usr/bin/freshclam',
|
||||||
'gpg' => '/usr/bin/gpg',
|
'gpg' => '/usr/bin/gpg',
|
||||||
'packager' => 'build@stylite.de',
|
'packager' => 'build@stylite.de',
|
||||||
'obs' => false,
|
'obs' => './obs',
|
||||||
'changelog' => false, // eg. '* 1. Zeile\n* 2. Zeile' for debian.changes
|
'changelog' => false, // eg. '* 1. Zeile\n* 2. Zeile' for debian.changes
|
||||||
'changelog_packager' => 'Ralf Becker <rb@stylite.de>',
|
'changelog_packager' => 'Ralf Becker <rb@stylite.de>',
|
||||||
'editsvnchangelog' => '* ',
|
'editsvnchangelog' => '* ',
|
||||||
'editor' => '/usr/bin/vi',
|
'editor' => '/usr/bin/vi',
|
||||||
'svntag' => 'tags/Stylite-EPL-$version.$packaging', // eg. '$version.$packaging'
|
'svntag' => 'tags/Stylite-EPL-$version.$packaging', // eg. '$version.$packaging'
|
||||||
|
'release' => 'root@download.stylite.de:/var/www/html/stylite-epl/stylite-epl-$version/',
|
||||||
'skip' => array(),
|
'skip' => array(),
|
||||||
'run' => array('svntag','checkout','copy','virusscan','create','sign')
|
'run' => array('svntag','checkout','copy','virusscan','create','sign','obs')
|
||||||
);
|
);
|
||||||
|
|
||||||
// process config from command line
|
// process config from command line
|
||||||
@ -71,21 +73,22 @@ while(($arg = array_shift($argv)))
|
|||||||
case 'run':
|
case 'run':
|
||||||
if ($value[0] == '+')
|
if ($value[0] == '+')
|
||||||
{
|
{
|
||||||
$config[$name] = array_unique(array_merge($config[$name],preg_split('/[ ,]+/',$value)));
|
$config[$name] = array_unique(array_merge($config[$name],preg_split('/[ ,]+/',substr($value,1))));
|
||||||
}
|
}
|
||||||
elseif ($value[0] == '-')
|
elseif ($value[0] == '-')
|
||||||
{
|
{
|
||||||
$config[$name] = array_diff($config[$name],preg_split('/[ ,]+/',$value));
|
$config[$name] = array_diff($config[$name],preg_split('/[ ,]+/',substr($value,1)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$config[$name] = array_unique(split('[ ,]+',$value));
|
$config[$name] = array_unique(preg_split('/[ ,]+/',$value));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'svntag':
|
case 'svntag':
|
||||||
|
case 'release':
|
||||||
$config[$name] = $value;
|
$config[$name] = $value;
|
||||||
array_unshift($config['run'],'svntag');
|
array_unshift($config['run'],$name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'editsvnchangelog':
|
case 'editsvnchangelog':
|
||||||
@ -122,9 +125,28 @@ $svn = $config['svn'];
|
|||||||
|
|
||||||
foreach(array_diff($config['run'],$config['skip']) as $func)
|
foreach(array_diff($config['run'],$config['skip']) as $func)
|
||||||
{
|
{
|
||||||
|
chdir(dirname(__FILE__)); // make relative filenames work, if other command changes dir
|
||||||
call_user_func('do_'.$func);
|
call_user_func('do_'.$func);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Release sources by rsync'ing them to a distribution / download directory
|
||||||
|
*/
|
||||||
|
function do_release()
|
||||||
|
{
|
||||||
|
global $config,$verbose;
|
||||||
|
|
||||||
|
$target = $config['release'];
|
||||||
|
if (strpos($target,'$') !== false) // allow to use config vars like $svnbranch in module
|
||||||
|
{
|
||||||
|
$translate = array();
|
||||||
|
foreach($config as $name => $value) $translate['$'.$name] = $value;
|
||||||
|
$target = strtr($target,$translate);
|
||||||
|
}
|
||||||
|
$cmd = $config['rsync'].' '.$config['sourcedir'].'/*'.$config['version'].'.'.$config['packaging'].'* '.$target;
|
||||||
|
run_cmd($cmd);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query changelog from svn and let user edit it
|
* Query changelog from svn and let user edit it
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user