From e523488c70e33ec3bb83e785ec6dd20261b26974 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 2 Dec 2025 06:29:25 -0500 Subject: chore: new NeBuild API and breaking SDK changes. Signed-off-by: Amlal El Mahrouss --- src/lib/JSONManifestBuilder.cc | 8 +++++--- src/lib/TOMLManifestBuilder.cc | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/JSONManifestBuilder.cc b/src/lib/JSONManifestBuilder.cc index 9de6608..c6ff4d8 100644 --- a/src/lib/JSONManifestBuilder.cc +++ b/src/lib/JSONManifestBuilder.cc @@ -4,6 +4,8 @@ // ============================================================= // #include +#include +#include using namespace NeBuild; using namespace nlohmann; @@ -18,14 +20,14 @@ namespace FS = std::filesystem; /// @retval true building has succeeded. /// @retval false fail to build, see error message. /// =========================================================== /// -bool JSONManifestBuilder::BuildTarget(const std::string& argv_val, const bool dry_run) { +bool JSONManifestBuilder::BuildTarget(BuildConfig& config) { std::string path; - if (argv_val.empty()) { + if (config.path_.empty()) { NeBuild::Logger::info() << "nebuild: error: file path is empty" << std::endl; return false; } else { - path = argv_val; + path = config.path_; if (!FS::exists(path)) { NeBuild::Logger::info() << "nebuild: error: file '" << path << "' does not exist" diff --git a/src/lib/TOMLManifestBuilder.cc b/src/lib/TOMLManifestBuilder.cc index fc10c88..a58b280 100644 --- a/src/lib/TOMLManifestBuilder.cc +++ b/src/lib/TOMLManifestBuilder.cc @@ -4,6 +4,7 @@ // ============================================================= // #include +#include #include using namespace NeBuild; @@ -17,14 +18,14 @@ namespace FS = std::filesystem; /// @retval true building has succeeded. /// @retval false fail to build, see error message. /// =========================================================== /// -bool TOMLManifestBuilder::BuildTarget(const std::string& argv_val, const bool dry_run) { +bool TOMLManifestBuilder::BuildTarget(BuildConfig& config) { std::string path; - if (argv_val.empty()) { + if (config.path_.empty()) { NeBuild::Logger::info() << "nebuild: error: file path is empty" << std::endl; return false; } else { - path = argv_val; + path = config.path_; if (!FS::exists(path)) { NeBuild::Logger::info() << "nebuild: error: file '" << path << "' does not exist" -- cgit v1.2.3