|
|
|
|
|
|
|
|
auto relpath = fs::relative(filepath, in_root); |
|
|
auto relpath = fs::relative(filepath, in_root); |
|
|
dds_log(debug, "Export file {}", relpath.string()); |
|
|
dds_log(debug, "Export file {}", relpath.string()); |
|
|
auto dest = out_root / relpath; |
|
|
auto dest = out_root / relpath; |
|
|
fs::create_directories(dest.parent_path()); |
|
|
|
|
|
|
|
|
fs::create_directories(fs::absolute(dest).parent_path()); |
|
|
fs::copy(filepath, dest); |
|
|
fs::copy(filepath, dest); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (fs::exists(dest) && params.force) { |
|
|
if (fs::exists(dest) && params.force) { |
|
|
fs::remove_all(dest); |
|
|
fs::remove_all(dest); |
|
|
} |
|
|
} |
|
|
fs::create_directories(dest.parent_path()); |
|
|
|
|
|
|
|
|
fs::create_directories(fs::absolute(dest).parent_path()); |
|
|
safe_rename(tempdir.path(), dest); |
|
|
safe_rename(tempdir.path(), dest); |
|
|
dds_log(info, "Source distribution created in {}", dest.string()); |
|
|
dds_log(info, "Source distribution created in {}", dest.string()); |
|
|
return sdist::from_directory(dest); |
|
|
return sdist::from_directory(dest); |
|
|
|
|
|
|
|
|
auto tempdir = temporary_dir::create(); |
|
|
auto tempdir = temporary_dir::create(); |
|
|
dds_log(debug, "Generating source distribution in {}", tempdir.path().string()); |
|
|
dds_log(debug, "Generating source distribution in {}", tempdir.path().string()); |
|
|
create_sdist_in_dir(tempdir.path(), params); |
|
|
create_sdist_in_dir(tempdir.path(), params); |
|
|
fs::create_directories(filepath.parent_path()); |
|
|
|
|
|
|
|
|
fs::create_directories(fs::absolute(filepath).parent_path()); |
|
|
neo::compress_directory_targz(tempdir.path(), filepath); |
|
|
neo::compress_directory_targz(tempdir.path(), filepath); |
|
|
} |
|
|
} |
|
|
|
|
|
|