Przeglądaj źródła

Check that there is a package for 'sdist create'

default_compile_flags
vector-of-bool 3 lat temu
rodzic
commit
4be3c60ecf
1 zmienionych plików z 7 dodań i 1 usunięć
  1. +7
    -1
      src/dds/cli/cmd/sdist_create.cpp

+ 7
- 1
src/dds/cli/cmd/sdist_create.cpp Wyświetl plik

@@ -1,5 +1,6 @@
#include "../options.hpp"

#include <dds/error/errors.hpp>
#include <dds/sdist/dist.hpp>

#include <fmt/core.h>
@@ -14,7 +15,12 @@ int sdist_create(const options& opts) {
.include_apps = true,
.include_tests = true,
};
auto pkg_man = package_manifest::load_from_directory(params.project_dir);
auto pkg_man = package_manifest::load_from_directory(params.project_dir);
if (!pkg_man) {
dds::throw_user_error<
errc::invalid_pkg_filesystem>("The source root at [{}] is not a valid dds source root",
params.project_dir.string());
}
auto default_filename = fmt::format("{}.tar.gz", pkg_man->id.to_string());
auto filepath = opts.out_path.value_or(fs::current_path() / default_filename);
create_sdist_targz(filepath, params);

Ładowanie…
Anuluj
Zapisz