1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
use structopt::StructOpt;
pub(crate) mod plugins;
pub(crate) mod public;
pub(crate) mod run_cmd;
pub(crate) mod utils;
#[derive(Debug, StructOpt)]
#[structopt(name = "st")]
pub enum StCli {
Build,
Clean,
Format,
Lint,
Outdated,
Run,
Update,
Test,
Sync,
Lock,
Install,
Publish,
Bump(public::bump::Bump),
Docker(public::docker::DockerCmd),
}
impl StCli {
pub fn run(&self) {
match self {
StCli::Build => run_cmd::run_build_cmd(),
StCli::Clean => run_cmd::run_clean_cmd(),
StCli::Format => run_cmd::run_format_cmd(),
StCli::Lint => run_cmd::run_lint_cmd(),
StCli::Outdated => run_cmd::run_outdated_cmd(),
StCli::Run => run_cmd::run_run_cmd(),
StCli::Update => run_cmd::run_update_cmd(),
StCli::Test => run_cmd::run_test_cmd(),
StCli::Sync => run_cmd::run_sync_cmd(),
StCli::Lock => run_cmd::run_lock_cmd(),
StCli::Install => run_cmd::run_install_cmd(),
StCli::Publish => run_cmd::run_publish_cmd(),
StCli::Bump(bump) => run_cmd::run_bump_cmd(bump),
StCli::Docker(d) => run_cmd::run_docker_cmd(d),
}
}
}