Browse Source

[TASK] better development process

pull/141/head
Kanti 11 years ago
parent
commit
65adddb3dd
3 changed files with 8 additions and 4 deletions
  1. +1
    -1
      index.php
  2. +0
    -1
      system/htmly.php
  3. +7
    -2
      system/upgrade/run.php

+ 1
- 1
index.php 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';

+ 0
- 1
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'));


+ 7
- 2
system/upgrade/run.php 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/");
}

Loading…
Cancel
Save