Menu

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

Download this file

94 lines (81 with data), 1.8 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
<?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";
echo "Documentation..\n";
$e="cp -R docs $dist";
echo $e;
system($e);
$e="cp -R api-docs $dist";
echo $e;
system($e);
$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"
);
foreach($files as $file){
$e="cp $file $dist";
echo $e."\n";
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.