mirror of
				https://github.com/threeal/cmake-action.git
				synced 2025-11-04 05:43:42 +00:00 
			
		
		
		
	feat: only run CMake build step if run-build input is true
				
					
				
			This commit is contained in:
		
							parent
							
								
									13fd9f9841
								
							
						
					
					
						commit
						68cba48ffe
					
				
							
								
								
									
										3
									
								
								main/index.mjs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										3
									
								
								main/index.mjs
									
									
									
										generated
									
									
									
								
							@ -27245,8 +27245,11 @@ async function main() {
 | 
			
		||||
    const buildDir = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("build-dir");
 | 
			
		||||
    await _actions_exec__WEBPACK_IMPORTED_MODULE_1__.exec("cmake", [sourceDir || ".", "-B", buildDir || "build"]);
 | 
			
		||||
    _actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput("build-dir", buildDir || "build");
 | 
			
		||||
    const runBuild = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getBooleanInput("run-build");
 | 
			
		||||
    if (runBuild) {
 | 
			
		||||
        await _actions_exec__WEBPACK_IMPORTED_MODULE_1__.exec("cmake", ["--build", buildDir || "build"]);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
main();
 | 
			
		||||
//# sourceMappingURL=main.mjs.map
 | 
			
		||||
})();
 | 
			
		||||
 | 
			
		||||
@ -7,7 +7,10 @@ async function main() {
 | 
			
		||||
  await exec.exec("cmake", [sourceDir || ".", "-B", buildDir || "build"]);
 | 
			
		||||
  core.setOutput("build-dir", buildDir || "build");
 | 
			
		||||
 | 
			
		||||
  const runBuild = core.getBooleanInput("run-build");
 | 
			
		||||
  if (runBuild) {
 | 
			
		||||
    await exec.exec("cmake", ["--build", buildDir || "build"]);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user