mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Build system can build different configurations
This commit is contained in:
		
							
								
								
									
										7
									
								
								build
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								build
									
									
									
									
									
								
							@@ -97,11 +97,14 @@ function rcopy(string $src, string $dst) {
 | 
				
			|||||||
//Initialize page
 | 
					//Initialize page
 | 
				
			||||||
require_once __DIR__."/system/system.php";
 | 
					require_once __DIR__."/system/system.php";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//Get the build configuration
 | 
				
			||||||
 | 
					if(!isset($_SERVER['argv'][1]))
 | 
				
			||||||
 | 
						exit("Usage: ./build [configuration]");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//Defines some variables
 | 
					//Defines some variables
 | 
				
			||||||
$output = __DIR__."/output/";
 | 
					$output = __DIR__."/output/";
 | 
				
			||||||
$debug_conf = "dev";
 | 
					$debug_conf = "dev";
 | 
				
			||||||
$release_conf = "build";
 | 
					$release_conf = $_SERVER['argv'][1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -187,7 +190,7 @@ if(isset($_SERVER["REDIRECT_URL"])){
 | 
				
			|||||||
        exit();
 | 
					        exit();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
} ?>';
 | 
					} ?>';
 | 
				
			||||||
$page_src .= load_page("build");
 | 
					$page_src .= load_page($release_conf);
 | 
				
			||||||
file_put_contents($output."index.php", $page_src);
 | 
					file_put_contents($output."index.php", $page_src);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Add .htaccess file
 | 
					// Add .htaccess file
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +1,11 @@
 | 
				
			|||||||
<?php
 | 
					<?php
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * PHP build config for the website
 | 
					 * PHP offline build config for the website
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @author Pierre HUBERT
 | 
					 * @author Pierre HUBERT
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Build {
 | 
					class Offline {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
	 * API access and credentials
 | 
						 * API access and credentials
 | 
				
			||||||
		Reference in New Issue
	
	Block a user