Build system can build different configurations

This commit is contained in:
Pierre 2018-04-29 21:09:22 +02:00
parent 8740c2128a
commit 8bb4df9f40
2 changed files with 7 additions and 4 deletions

7
build
View File

@ -97,11 +97,14 @@ function rcopy(string $src, string $dst) {
//Initialize page
require_once __DIR__."/system/system.php";
//Get the build configuration
if(!isset($_SERVER['argv'][1]))
exit("Usage: ./build [configuration]");
//Defines some variables
$output = __DIR__."/output/";
$debug_conf = "dev";
$release_conf = "build";
$release_conf = $_SERVER['argv'][1];
@ -187,7 +190,7 @@ if(isset($_SERVER["REDIRECT_URL"])){
exit();
}
} ?>';
$page_src .= load_page("build");
$page_src .= load_page($release_conf);
file_put_contents($output."index.php", $page_src);
// Add .htaccess file

View File

@ -1,11 +1,11 @@
<?php
/**
* PHP build config for the website
* PHP offline build config for the website
*
* @author Pierre HUBERT
*/
class Build {
class Offline {
/**
* API access and credentials