This repository has been archived by the owner on Oct 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
37 lines (34 loc) · 1.51 KB
/
test.php
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
<?php
require_once 'Updater_cache.php';
require_once 'Updater_utility.php';
require_once 'Updater.php';
$updater = new Updater(array(
'repository' => 'OpenSID/OpenSID', // Repository yang akan dipantau
'branch' => 'master', // Branch mana yang ingin dipantau?
'prerelease' => FALSE, // Gunakan pre-rilis?
'saveto' => './', // Tempat menyimpan file update
'skipped' => '.skipped', // Nama - nama file yang akan di skip saat update (taruh perbaris di file ini)
'version' => 'version.json', // Nama file tempat menyimpan versi app terinstall
'zipball' => 'zipball.zip', // Nama file zip sementara
'cachefile' => 'cache.json', // Nama file cache
'cachedir' => 'mycache/', // Folder tempat menyimpan file - file cache
'expiry' => 43200, // Waktu kadaluarsa cache
'exceptions' => TRUE, // Tampilkan pesan exception?
));
if ($updater->isAbleToUpdate()) {
if (isset($_GET['mutakhirkan'])) {
$updater->doUpdate();
echo '<h3>Aplikasi Berhasil Dimutakhirkan!</h3>';
}
else {
$newest = $updater->getNewestInfo();
echo '<h2>Versi Mutakhir Saat Ini: '.$newest['tag_name'].'</h2>';
echo '<h3>Catatan Perubahan:</h3>';
echo nl2br($newest['body']);
echo '<br>---------------------------------------<br>';
echo '<a href="?mutakhirkan">MUTAKHIRKAN</a>';
}
}
else {
echo '<h3>Anda Menggunakan Versi Paling Mutakhir!</h3>';
}