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