Skip to content

Commit eeffa78

Browse files
committed
add misko's fetchLatestSnapshot.php
1 parent 4f29a9c commit eeffa78

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

fetchLatestSnapshot.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<html>
2+
<head>
3+
<title>Update site from: GitHub master</title>
4+
</head>
5+
<body>
6+
<pre><?php echo `date`; ?></pre>
7+
<pre><?
8+
$ver = $_GET['ver'];
9+
$ciBase = 'http://ci.angularjs.org/job/angular.js-angular-v1.0.x/ws/build/pkg/';
10+
if ($ver) {
11+
echo shell_exec('wget '.$ciBase.$ver.'/'.'angular-'.$ver.'.tgz -O angular-snapshot.tgz');
12+
echo shell_exec('tar -xf angular-snapshot.tgz');
13+
echo shell_exec('mv snapshot snapshot.old');
14+
echo shell_exec('mv angular-' . $ver . ' snapshot');
15+
echo shell_exec('rm -rf angular-snapshot.tgz');
16+
echo shell_exec('rm -rf snapshot.old');
17+
18+
echo 'docs.angularjs.org now serving: '.$ver;
19+
} else {
20+
echo 'ERROR: No version specified';
21+
}
22+
?></pre>
23+
</body>
24+
</html>

0 commit comments

Comments
 (0)