mirror of
https://github.com/threeal/cmake-action.git
synced 2025-06-10 19:21:20 +00:00
feat: get source-dir
and build-dir
inputs
This commit is contained in:
parent
9560f2ef81
commit
16feeec90d
6
main/index.mjs
generated
6
main/index.mjs
generated
@ -27241,8 +27241,10 @@ var __webpack_exports__ = {};
|
|||||||
|
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
await _actions_exec__WEBPACK_IMPORTED_MODULE_1__.exec("cmake", [".", "-B", "build"]);
|
const sourceDir = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("source-dir");
|
||||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput("build-dir", "build");
|
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");
|
||||||
}
|
}
|
||||||
main();
|
main();
|
||||||
//# sourceMappingURL=main.mjs.map
|
//# sourceMappingURL=main.mjs.map
|
||||||
|
@ -2,8 +2,10 @@ import core from "@actions/core";
|
|||||||
import exec from "@actions/exec";
|
import exec from "@actions/exec";
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
await exec.exec("cmake", [".", "-B", "build"]);
|
const sourceDir = core.getInput("source-dir");
|
||||||
core.setOutput("build-dir", "build");
|
const buildDir = core.getInput("build-dir");
|
||||||
|
await exec.exec("cmake", [sourceDir || ".", "-B", buildDir || "build"]);
|
||||||
|
core.setOutput("build-dir", buildDir || "build");
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
Loading…
Reference in New Issue
Block a user