|
|
|
|
|
|
|
|
|
|
|
|
|
|
common_flags _common{cmd}; |
|
|
common_flags _common{cmd}; |
|
|
|
|
|
|
|
|
common_project_flags project{cmd}; |
|
|
|
|
|
|
|
|
|
|
|
args::Group sdist_group{cmd, "`sdist` commands"}; |
|
|
args::Group sdist_group{cmd, "`sdist` commands"}; |
|
|
|
|
|
|
|
|
struct { |
|
|
struct { |
|
|
cli_sdist& parent; |
|
|
cli_sdist& parent; |
|
|
args::Command cmd{parent.sdist_group, "create", "Create a source distribution"}; |
|
|
args::Command cmd{parent.sdist_group, "create", "Create a source distribution"}; |
|
|
|
|
|
|
|
|
|
|
|
common_project_flags project{cmd}; |
|
|
|
|
|
|
|
|
path_flag out{cmd, |
|
|
path_flag out{cmd, |
|
|
"out", |
|
|
"out", |
|
|
"The destination of the source distribution", |
|
|
"The destination of the source distribution", |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int run() { |
|
|
int run() { |
|
|
dds::sdist_params params; |
|
|
dds::sdist_params params; |
|
|
params.project_dir = parent.project.root.Get(); |
|
|
|
|
|
|
|
|
params.project_dir = project.root.Get(); |
|
|
params.dest_path = out.Get(); |
|
|
params.dest_path = out.Get(); |
|
|
params.force = force.Get(); |
|
|
params.force = force.Get(); |
|
|
dds::create_sdist(params); |
|
|
dds::create_sdist(params); |
|
|
|
|
|
|
|
|
"export", |
|
|
"export", |
|
|
"Export a source distribution to a repository"}; |
|
|
"Export a source distribution to a repository"}; |
|
|
|
|
|
|
|
|
|
|
|
common_project_flags project{cmd}; |
|
|
|
|
|
|
|
|
repo_where_flag repo_where{cmd}; |
|
|
repo_where_flag repo_where{cmd}; |
|
|
args::Flag force{cmd, |
|
|
args::Flag force{cmd, |
|
|
"replace-if-exists", |
|
|
"replace-if-exists", |
|
|
|
|
|
|
|
|
dds::fs::remove_all(tmp_sdist); |
|
|
dds::fs::remove_all(tmp_sdist); |
|
|
} |
|
|
} |
|
|
dds::sdist_params params; |
|
|
dds::sdist_params params; |
|
|
params.project_dir = parent.project.root.Get(); |
|
|
|
|
|
|
|
|
params.project_dir = project.root.Get(); |
|
|
params.dest_path = tmp_sdist; |
|
|
params.dest_path = tmp_sdist; |
|
|
params.force = true; |
|
|
params.force = true; |
|
|
auto sdist = dds::create_sdist(params); |
|
|
auto sdist = dds::create_sdist(params); |