mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
Build system can build different configurations
This commit is contained in:
parent
8740c2128a
commit
8bb4df9f40
7
build
7
build
@ -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
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user