From 031e1815167e0adac88c7621c1c6d5dd0a75c75b Mon Sep 17 00:00:00 2001 From: David Date: Mon, 4 Dec 2023 09:43:06 +0700 Subject: [PATCH] [#498] Update using switch --- .../Sources/iOSTemplateMaker/SetUpCICDService.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Scripts/Swift/iOSTemplateMaker/Sources/iOSTemplateMaker/SetUpCICDService.swift b/Scripts/Swift/iOSTemplateMaker/Sources/iOSTemplateMaker/SetUpCICDService.swift index 84e4544d..82b884c2 100644 --- a/Scripts/Swift/iOSTemplateMaker/Sources/iOSTemplateMaker/SetUpCICDService.swift +++ b/Scripts/Swift/iOSTemplateMaker/Sources/iOSTemplateMaker/SetUpCICDService.swift @@ -59,12 +59,13 @@ struct SetUpCICDService { fileManager.removeItems(in: "codemagic.yaml") fileManager.removeItems(in: ".github/workflows") fileManager.createDirectory(path: ".github/workflows") - if runnerType == "s" { - fileManager.moveFiles(in: ".github/self_hosted_project_workflows", to: ".github/workflows") + switch runnerType { + case .macOSLatest: + fileManager.moveFiles(in: ".github/project_workflows", to: ".github/workflows") fileManager.removeItems(in: ".github/project_workflows") fileManager.removeItems(in: ".github/self_hosted_project_workflows") - } else { - fileManager.moveFiles(in: ".github/project_workflows", to: ".github/workflows") + case .selfHosted: + fileManager.moveFiles(in: ".github/self_hosted_project_workflows", to: ".github/workflows") fileManager.removeItems(in: ".github/project_workflows") fileManager.removeItems(in: ".github/self_hosted_project_workflows") }