diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-20 11:42:05 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-25 13:59:48 +0200 |
commit | 4392b0de9b77d750f4c531c167ab008237cfde1a (patch) | |
tree | 3c5fea5d7661d1085e2d51a37a6cafae611ccbba /src/buildtool/main/add_to_cas.cpp | |
parent | a39592af10ad2a43b5d444d1bee018b72f696f6b (diff) | |
download | justbuild-4392b0de9b77d750f4c531c167ab008237cfde1a.tar.gz |
Pass ApiBundle to add-to-cas and install-cas
Diffstat (limited to 'src/buildtool/main/add_to_cas.cpp')
-rw-r--r-- | src/buildtool/main/add_to_cas.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/buildtool/main/add_to_cas.cpp b/src/buildtool/main/add_to_cas.cpp index 711a31bf..984c2007 100644 --- a/src/buildtool/main/add_to_cas.cpp +++ b/src/buildtool/main/add_to_cas.cpp @@ -23,14 +23,13 @@ #include "src/buildtool/compatibility/native_support.hpp" #include "src/buildtool/execution_api/bazel_msg/bazel_msg_factory.hpp" -#include "src/buildtool/execution_api/local/local_api.hpp" +#include "src/buildtool/execution_api/common/execution_api.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/buildtool/storage/storage.hpp" -auto AddArtifactsToCas(ToAddArguments const& clargs, - gsl::not_null<IExecutionApi*> const& remote_api) +auto AddArtifactsToCas(ToAddArguments const& clargs, ApiBundle const& apis) -> bool { auto const& cas = Storage::Instance().CAS(); @@ -108,7 +107,7 @@ auto AddArtifactsToCas(ToAddArguments const& clargs, auto object = std::vector<Artifact::ObjectInfo>{ Artifact::ObjectInfo{ArtifactDigest(*digest), *object_type, false}}; - if (not LocalApi().RetrieveToCas(object, remote_api)) { + if (not apis.local->RetrieveToCas(object, &*apis.remote)) { Logger::Log(LogLevel::Error, "Failed to upload artifact to remote endpoint"); return false; |