summaryrefslogtreecommitdiffstats
path: root/WebPush/index.php
blob: fc3405fe27dba54c99eab47a262d42ac4651c9ad (plain)
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
<?php

//We want to be able to continue if the client aborts.
ignore_user_abort();
set_time_limit(0);
error_reporting(E_ALL);
ini_set('display_errors', 'Off');
ini_set('error_log', 'errors.log');

//Abort the browser so it doesn't hang while we do the uploading.
ob_end_clean();
header("Connection: close");
ob_start();
header("Content-Length: 0");
ob_end_flush();
flush();

//Lets get to work!
include('upload.php');

$build = $_GET['buildid'];
$branch = $_GET['branch'];
$version = $_GET['version'];

include('../build/function.php');
updateval($branch);

if ($build == "" || $branch == "" || $version == "") {
  die('Invalid');
}

//Don't upload dev builds atm.
if ($branch == "bt2") {
  die();
}

sleep(60);

$changes = getChanges($build, $branch);

uploadit($build, $branch, 'Essentials.jar', $version, $changes);
sleep(1);
uploadit($build, $branch, 'EssentialsChat.jar', $version, $changes);
sleep(1);
uploadit($build, $branch, 'EssentialsSpawn.jar', $version, $changes);
sleep(1);
uploadit($build, $branch, 'EssentialsProtect.jar', $version, $changes);
sleep(1);
uploadit($build, $branch, 'EssentialsXMPP.jar', $version, $changes);
sleep(1);
uploadit($build, $branch, 'EssentialsGeoIP.jar', $version, $changes);
?>