From 162d98cf5b356f37816f97243a5f2f3acce89849 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Wed, 27 May 2026 04:38:30 +0200 Subject: [PATCH] got rid of --local --- project.cpp | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/project.cpp b/project.cpp index 65bcb44..c5d39a1 100644 --- a/project.cpp +++ b/project.cpp @@ -6,34 +6,18 @@ using namespace Crafter; extern "C" Configuration CrafterBuildProject(std::span args) { std::vector depArgs(args.begin(), args.end()); - // --local resolves Crafter.* deps from sibling working trees instead of - // fetching them from forgejo. Use during cross-repo development so edits - // in ../Crafter.Asset are picked up without commit-and-pull. Add to - // depArgs too so transitive deps inherit the same mode. - bool useLocal = false; - for (std::string_view a : args) { - if (a == "--local") { useLocal = true; break; } - } - if (useLocal && std::find(depArgs.begin(), depArgs.end(), std::string("--local")) == depArgs.end()) { - depArgs.push_back("--local"); - } - - auto resolveDep = [&](std::string_view name, std::string_view gitUrl) -> Configuration* { - if (useLocal) { - return LocalProject({ - .projectFile = fs::path("../") / name / "project.cpp", - .args = depArgs, - }); - } - return GitProject({ - .source = { .url = std::string(gitUrl) }, - .args = depArgs, - }); - }; - - Configuration* event = resolveDep("Crafter.Event", "https://forgejo.catcrafts.net/Catcrafts/Crafter.Event.git"); - Configuration* math = resolveDep("Crafter.Math", "https://forgejo.catcrafts.net/Catcrafts/Crafter.Math.git"); - Configuration* asset = resolveDep("Crafter.Asset", "https://forgejo.catcrafts.net/Catcrafts/Crafter.Asset.git"); + Configuration* event = GitProject({ + .source = { .url = "https://forgejo.catcrafts.net/Catcrafts/Crafter.Event.git" }, + .args = depArgs, + }); + Configuration* math = GitProject({ + .source = { "https://forgejo.catcrafts.net/Catcrafts/Crafter.Math.git" }, + .args = depArgs, + }); + Configuration* asset = GitProject({ + .source = { "https://forgejo.catcrafts.net/Catcrafts/Crafter.Asset.git" }, + .args = depArgs, + }); Configuration cfg; cfg.path = "./";