소스 검색

Rearrange flags on sdist command

default_compile_flags
vector-of-bool 5 년 전
부모
커밋
e324031738
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. +6
    -4
      src/dds/dds.main.cpp

+ 6
- 4
src/dds/dds.main.cpp 파일 보기



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);

Loading…
취소
저장