From 61d184d83db619359505061cc71c591697302a3f Mon Sep 17 00:00:00 2001 From: Anton Felinskyi Date: Thu, 2 Jun 2022 14:02:57 +0300 Subject: [PATCH 1/3] iosBuildStepsUpdate: project+workspace steps added --- Editor/Platforms/iOS/Post/Archive/Archive.cs | 6 +++--- Editor/Platforms/iOS/Post/Archive/ArchiveProject.cs | 7 +++++++ Editor/Platforms/iOS/Post/Archive/ArchiveWorkspace.cs | 7 +++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 Editor/Platforms/iOS/Post/Archive/ArchiveProject.cs create mode 100644 Editor/Platforms/iOS/Post/Archive/ArchiveWorkspace.cs diff --git a/Editor/Platforms/iOS/Post/Archive/Archive.cs b/Editor/Platforms/iOS/Post/Archive/Archive.cs index 61be7a4..7ec00ca 100644 --- a/Editor/Platforms/iOS/Post/Archive/Archive.cs +++ b/Editor/Platforms/iOS/Post/Archive/Archive.cs @@ -1,5 +1,4 @@ using System.Threading.Tasks; -using UniTools.Build; using UnityEngine; namespace UniTools.Build @@ -11,12 +10,13 @@ namespace UniTools.Build fileName = nameof(Archive), menuName = MenuPaths.IOS + nameof(Archive) )] - public sealed class Archive : IosPostBuildStep + public class Archive : IosPostBuildStep { [SerializeField] private PathProperty m_projectPath = new PathProperty("Unity-iPhone.xcodeproj"); [SerializeField] private PathProperty m_outputPath = new PathProperty("Unity-iPhone.xcarchive"); [SerializeField] private string m_scheme = "Unity-iPhone"; [SerializeField] private bool m_useModernBuildSystem = true; + protected virtual string CommandStart { get; set; } public override async Task Execute() { @@ -24,7 +24,7 @@ public override async Task Execute() XCodeBuild build = Cli.Tool(); string command = - $"-project {m_projectPath}" + + $"-{CommandStart} {m_projectPath}" + $" -scheme \"{m_scheme}\"" + " archive" + $" -archivePath {m_outputPath}" + diff --git a/Editor/Platforms/iOS/Post/Archive/ArchiveProject.cs b/Editor/Platforms/iOS/Post/Archive/ArchiveProject.cs new file mode 100644 index 0000000..b46267e --- /dev/null +++ b/Editor/Platforms/iOS/Post/Archive/ArchiveProject.cs @@ -0,0 +1,7 @@ +namespace UniTools.Build +{ + public sealed class ArchiveProject : Archive + { + protected override string CommandStart => "project"; + } +} \ No newline at end of file diff --git a/Editor/Platforms/iOS/Post/Archive/ArchiveWorkspace.cs b/Editor/Platforms/iOS/Post/Archive/ArchiveWorkspace.cs new file mode 100644 index 0000000..c812e12 --- /dev/null +++ b/Editor/Platforms/iOS/Post/Archive/ArchiveWorkspace.cs @@ -0,0 +1,7 @@ +namespace UniTools.Build +{ + public sealed class ArchiveWorkspace: Archive + { + protected override string CommandStart => "workspace"; + } +} \ No newline at end of file From 26dfdc682087f50d7c96ce3d747d28b3c1de41ba Mon Sep 17 00:00:00 2001 From: Anton Felinskyi Date: Fri, 3 Jun 2022 08:27:38 +0300 Subject: [PATCH 2/3] iosBuildStepsUpdate: pr fixes --- Editor/Platforms/iOS/Post/Archive/Archive.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Editor/Platforms/iOS/Post/Archive/Archive.cs b/Editor/Platforms/iOS/Post/Archive/Archive.cs index 7ec00ca..7167e6e 100644 --- a/Editor/Platforms/iOS/Post/Archive/Archive.cs +++ b/Editor/Platforms/iOS/Post/Archive/Archive.cs @@ -10,13 +10,13 @@ namespace UniTools.Build fileName = nameof(Archive), menuName = MenuPaths.IOS + nameof(Archive) )] - public class Archive : IosPostBuildStep + public abstract class Archive : IosPostBuildStep { [SerializeField] private PathProperty m_projectPath = new PathProperty("Unity-iPhone.xcodeproj"); [SerializeField] private PathProperty m_outputPath = new PathProperty("Unity-iPhone.xcarchive"); [SerializeField] private string m_scheme = "Unity-iPhone"; [SerializeField] private bool m_useModernBuildSystem = true; - protected virtual string CommandStart { get; set; } + protected abstract string CommandStart { get; } public override async Task Execute() { From b16b7b3176e65b9b86c83a822fe2b637c7cd6fc6 Mon Sep 17 00:00:00 2001 From: Anton Felinskyi Date: Fri, 3 Jun 2022 08:53:37 +0300 Subject: [PATCH 3/3] iosBuildStepsUpdate: version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f650c9c..4d7259d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "displayName": "UniTools.Build", "name": "com.unitools.build", - "version": "0.0.7-preview", + "version": "0.0.8-preview", "unity": "2019.1", "description": "Customizable Build Pipeline for Unity3D", "keywords": [