[TASK] better development process

This commit is contained in:
Kanti 2015-01-23 11:55:36 +01:00
commit 65adddb3dd
3 changed files with 8 additions and 4 deletions

View file

@ -1,5 +1,5 @@
<?php <?php
$config_file = 'config/config.ini';
require 'system/vendor/autoload.php'; require 'system/vendor/autoload.php';
require_once "system/upgrade/run.php"; require_once "system/upgrade/run.php";
require 'system/htmly.php'; require 'system/htmly.php';

View file

@ -4,7 +4,6 @@
date_default_timezone_set('Asia/Jakarta'); date_default_timezone_set('Asia/Jakarta');
// Load the configuration file // Load the configuration file
$config_file = 'config/config.ini';
config('source', $config_file); config('source', $config_file);
if(config('timezone')) { if(config('timezone')) {
date_default_timezone_set(config('timezone')); date_default_timezone_set(config('timezone'));

View file

@ -1,5 +1,7 @@
<?php <?php
config('source', $config_file);
$updater = new Kanti\HubUpdater("danpros/htmly"); $updater = new Kanti\HubUpdater("danpros/htmly");
$info = $updater->getCurrentInfo(); $info = $updater->getCurrentInfo();
$versionNumber = substr($info['tag_name'], 1); $versionNumber = substr($info['tag_name'], 1);
@ -32,5 +34,8 @@ if (isGraterThan("2.3")) {// 2.4, 2.5, ...
} }
} }
file_put_contents("index.php", file_get_contents("system/upgrade/index.php"));
rrmdir("system/upgrade/"); if(!config("dev")){
file_put_contents("index.php", file_get_contents("system/upgrade/index.php"));
rrmdir("system/upgrade/");
}