Browse Source

Check that there is a package for 'sdist create'

default_compile_flags
vector-of-bool 3 years ago
parent
commit
4be3c60ecf
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      src/dds/cli/cmd/sdist_create.cpp

+ 7
- 1
src/dds/cli/cmd/sdist_create.cpp View File

#include "../options.hpp" #include "../options.hpp"


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


#include <fmt/core.h> #include <fmt/core.h>
.include_apps = true, .include_apps = true,
.include_tests = 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 default_filename = fmt::format("{}.tar.gz", pkg_man->id.to_string());
auto filepath = opts.out_path.value_or(fs::current_path() / default_filename); auto filepath = opts.out_path.value_or(fs::current_path() / default_filename);
create_sdist_targz(filepath, params); create_sdist_targz(filepath, params);

Loading…
Cancel
Save