Reviewed-on: #2694 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
		
			
				
	
	
		
			21 lines
		
	
	
		
			534 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			534 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import path from "path";
 | 
						|
import fs from "fs";
 | 
						|
import { repoDir } from "../helpers/pathHelper.ts";
 | 
						|
 | 
						|
interface IBuildConfig {
 | 
						|
    version: string;
 | 
						|
    buildLabel: string;
 | 
						|
    matchmakingBuildId: string;
 | 
						|
}
 | 
						|
 | 
						|
export const buildConfig: IBuildConfig = {
 | 
						|
    version: "",
 | 
						|
    buildLabel: "",
 | 
						|
    matchmakingBuildId: ""
 | 
						|
};
 | 
						|
 | 
						|
const buildConfigPath = path.join(repoDir, "static/data/buildConfig.json");
 | 
						|
if (fs.existsSync(buildConfigPath)) {
 | 
						|
    Object.assign(buildConfig, JSON.parse(fs.readFileSync(buildConfigPath, "utf-8")) as IBuildConfig);
 | 
						|
}
 |