Skip to content

Commit 031e181

Browse files
committed
[#498] Update using switch
1 parent c5d8da3 commit 031e181

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Scripts/Swift/iOSTemplateMaker/Sources/iOSTemplateMaker/SetUpCICDService.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,13 @@ struct SetUpCICDService {
5959
fileManager.removeItems(in: "codemagic.yaml")
6060
fileManager.removeItems(in: ".github/workflows")
6161
fileManager.createDirectory(path: ".github/workflows")
62-
if runnerType == "s" {
63-
fileManager.moveFiles(in: ".github/self_hosted_project_workflows", to: ".github/workflows")
62+
switch runnerType {
63+
case .macOSLatest:
64+
fileManager.moveFiles(in: ".github/project_workflows", to: ".github/workflows")
6465
fileManager.removeItems(in: ".github/project_workflows")
6566
fileManager.removeItems(in: ".github/self_hosted_project_workflows")
66-
} else {
67-
fileManager.moveFiles(in: ".github/project_workflows", to: ".github/workflows")
67+
case .selfHosted:
68+
fileManager.moveFiles(in: ".github/self_hosted_project_workflows", to: ".github/workflows")
6869
fileManager.removeItems(in: ".github/project_workflows")
6970
fileManager.removeItems(in: ".github/self_hosted_project_workflows")
7071
}

0 commit comments

Comments
 (0)