mirror of
https://github.com/threeal/cmake-action.git
synced 2025-07-27 08:14:23 +00:00
feat: modify configureProject
function to be sync
This commit is contained in:
parent
ca58db1467
commit
268421c55b
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
@ -24841,7 +24841,7 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
|
||||
*
|
||||
* @param inputs - The action inputs.
|
||||
*/
|
||||
async function configureProject(inputs) {
|
||||
function configureProject(inputs) {
|
||||
const configureArgs = [];
|
||||
if (inputs.sourceDir) {
|
||||
configureArgs.push(inputs.sourceDir);
|
||||
@ -24891,7 +24891,7 @@ __nccwpck_require__.a(module, async (__webpack_handle_async_dependencies__, __we
|
||||
|
||||
try {
|
||||
const inputs = (0,_inputs_js__WEBPACK_IMPORTED_MODULE_2__/* .getInputs */ .G)();
|
||||
await (0,_cmake_js__WEBPACK_IMPORTED_MODULE_1__/* .configureProject */ .N)(inputs);
|
||||
(0,_cmake_js__WEBPACK_IMPORTED_MODULE_1__/* .configureProject */ .N)(inputs);
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput("build-dir", inputs.buildDir);
|
||||
if (inputs.runBuild) {
|
||||
await (0,_cmake_js__WEBPACK_IMPORTED_MODULE_1__/* .buildProject */ ._)(inputs);
|
||||
|
@ -119,8 +119,7 @@ describe("configure a CMake project", () => {
|
||||
|
||||
jest.mocked(execFileSync).mockReset();
|
||||
|
||||
const prom = configureProject({ ...defaultInputs, ...testCase.inputs });
|
||||
await expect(prom).resolves.toBeUndefined();
|
||||
configureProject({ ...defaultInputs, ...testCase.inputs });
|
||||
|
||||
expect(execFileSync).toHaveBeenCalledTimes(1);
|
||||
expect(execFileSync).toHaveBeenLastCalledWith(
|
||||
|
@ -6,7 +6,7 @@ import type { Inputs } from "./inputs.js";
|
||||
*
|
||||
* @param inputs - The action inputs.
|
||||
*/
|
||||
export async function configureProject(inputs: Inputs): Promise<void> {
|
||||
export function configureProject(inputs: Inputs): void {
|
||||
const configureArgs = [];
|
||||
|
||||
if (inputs.sourceDir) {
|
||||
|
@ -5,7 +5,7 @@ import { getInputs } from "./inputs.js";
|
||||
try {
|
||||
const inputs = getInputs();
|
||||
|
||||
await configureProject(inputs);
|
||||
configureProject(inputs);
|
||||
|
||||
core.setOutput("build-dir", inputs.buildDir);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user