Skip to content

Commit 8d7a2a3

Browse files
committed
Refactor Runner::git_host to use dynamic subdomain
1 parent d753fcc commit 8d7a2a3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

crates/cli/src/project/runner.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ pub(crate) enum Runner {
1010
}
1111

1212
impl Runner {
13-
pub fn git_host(&self) -> &str {
13+
pub fn git_host(&self) -> String {
14+
format!("git@{}.smbcloud.xyz", self.api())
15+
}
16+
17+
fn api(&self) -> &str {
1418
match self {
15-
Runner::Swift => "git@api.musik88.com",
16-
_ => "git@api.smbcloud.xyz",
19+
Runner::NodeJs => "api",
20+
Runner::Ruby | Runner::Swift => "api-1",
1721
}
1822
}
1923
}

0 commit comments

Comments
 (0)