Menu

[r19]: / trunk / release.php  Maximize  Restore  History

Download this file

110 lines (92 with data), 2.0 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
<?php
/*
* release.php : $Id: release.php,v 1.1 2005/03/14 19:36:45 masham Exp $
*
* makes a release tarball. snags the version number out of
* the Id tag in phpagi.php.
*/
$version=`grep '\$Id:' phpagi.php`;
$version=str_replace(" ","",$version);
$foo=explode(" ",$version);
$version=$foo[3];
$dist="phpagi-".$version;
if(file_exists($dist)){
echo "Erp. $dist already exists. Remove it first.\n";
exit;
}
mkdir($dist);
if(!file_exists($dist)){
echo "$dist wasn't created??\n";
exit;
}
echo "Releasing for version $version. \nPress CTRL-C *NOW* if this is wrong.\n\n";
for($i=5;$i>0;$i--) {
echo "$i...\n";
sleep(1);
}
echo "poof!\n";
$files=array(
"README",
"COPYING",
"phpagi.php",
"phpagi-asmanager.php",
"phpagi-fastagi.php",
"mkdocs.php",
);
$examples=array(
"examples/README",
"examples/beep.gsm",
"examples/dtmf.php",
"examples/input.php",
"examples/my_ip.php",
"examples/ping.gsm",
"examples/ping.php",
"examples/ring.php",
"examples/sip_show_peer.php",
"examples/weather.php",
"examples/weather.txt.gz",
"examples/thanks.gsm"
);
$docs=array(
"CHANGELOG",
"fastagi.xinetd",
"phpagi.example.conf",
"README.phpagi",
"README.phpagi-asmanager",
"README.phpagi-fastagi"
);
foreach($files as $file){
$e="cp $file $dist";
echo $e."\n";
system($e);
}
echo "Documentation..\n";
mkdir("$dist/docs");
foreach($docs as $doc){
$e="cp docs/$doc $dist/docs";
echo $e."\n";
system($e);
}
$e="cp -R api-docs $dist";
echo $e;
system($e);
$ball="$dist".".tgz";
$e="tar czf $ball $dist";
system($e);
system("md5sum $ball > $ball.md5");
system("ls -al $ball*");
echo "Done!\n";
// now do samples.
$dist="phpagi-examples-$version";
mkdir($dist);
foreach($examples as $file){
$e="cp $file $dist";
echo $e."\n";
system($e);
}
$ball="phpagi-examples-".$version.".tgz";
$e="tar czpf $ball $dist";
system($e);
system("md5sum $ball > $ball.md5");
system("ls -al $ball*");
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.