From 79afd7ea3ee5998cee2bfeee1f0bee85534fc3a1 Mon Sep 17 00:00:00 2001 From: Bliss Pisit Wetcha Date: Thu, 28 Sep 2023 09:33:45 +0700 Subject: [PATCH] [fix] Fix folder naming --- Scripts/Swift/SetUpInterface.swift | 10 +++++----- Scripts/Swift/SetUpiOSProject.swift | 5 ++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Scripts/Swift/SetUpInterface.swift b/Scripts/Swift/SetUpInterface.swift index f34d42b8..ce675fc4 100644 --- a/Scripts/Swift/SetUpInterface.swift +++ b/Scripts/Swift/SetUpInterface.swift @@ -5,12 +5,12 @@ struct SetUpInterface { case swiftUI, uiKit init?(_ name: String) { - switch name.lowercased() { - case "s", "swiftui": + if name == "s" || name == "swiftui" { self = .swiftUI - case "u", "uikit": + } else if name == "u" || name == "uikit" { self = .uiKit - default: return nil + } else { + return nil } } @@ -40,7 +40,7 @@ struct SetUpInterface { let folderName = interface.folderName fileManager.moveFiles(in: "tuist/Interfaces/\(folderName)/Project", to: "") - fileManager.moveFiles(in: "tuist/Interfaces/\(folderName)/Sources", to: "TemplateApp/Sources") + fileManager.moveFiles(in: "tuist/Interfaces/\(folderName)/Sources", to: "\(projectName)/Sources") fileManager.removeItems(in: "tuist/Interfaces") } } diff --git a/Scripts/Swift/SetUpiOSProject.swift b/Scripts/Swift/SetUpiOSProject.swift index 9ad2ac5f..3bbf17ca 100644 --- a/Scripts/Swift/SetUpiOSProject.swift +++ b/Scripts/Swift/SetUpiOSProject.swift @@ -150,7 +150,8 @@ class SetUpIOSProject { print("Remove script files and git/index") fileManager.removeItems(in: "make.sh") - fileManager.removeItems(in: ".github/workflows/test_install_script.yml") + fileManager.removeItems(in: ".github/workflows/test_uikit_install_script.yml") + fileManager.removeItems(in: ".github/workflows/test_swiftui_install_script.yml") fileManager.removeItems(in: ".git/index") try safeShell("git reset") } @@ -159,8 +160,6 @@ class SetUpIOSProject { if !isCI { SetUpCICDService().perform() SetUpDeliveryConstants().perform() - fileManager.removeItems(in: "fastlane/Tests") - fileManager.removeItems(in: "set_up_test_testflight.sh") fileManager.removeItems(in: "Scripts") } print("✅ Completed")