Skip to content

Commit

Permalink
Merge pull request #14 from UniToolsTeam/feature/iosBildStepsUpdate
Browse files Browse the repository at this point in the history
iosBuildStepsUpdate: project+workspace steps added
  • Loading branch information
Rinal authored Jun 3, 2022
2 parents 2deae55 + b16b7b3 commit 2a7490d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Editor/Platforms/iOS/Post/Archive/Archive.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Threading.Tasks;
using UniTools.Build;
using UnityEngine;

namespace UniTools.Build
Expand All @@ -11,20 +10,21 @@ namespace UniTools.Build
fileName = nameof(Archive),
menuName = MenuPaths.IOS + nameof(Archive)
)]
public sealed 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 abstract string CommandStart { get; }

public override async Task Execute()
{
await Task.CompletedTask;

XCodeBuild build = Cli.Tool<XCodeBuild>();
string command =
$"-project {m_projectPath}" +
$"-{CommandStart} {m_projectPath}" +
$" -scheme \"{m_scheme}\"" +
" archive" +
$" -archivePath {m_outputPath}" +
Expand Down
7 changes: 7 additions & 0 deletions Editor/Platforms/iOS/Post/Archive/ArchiveProject.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace UniTools.Build
{
public sealed class ArchiveProject : Archive
{
protected override string CommandStart => "project";
}
}
7 changes: 7 additions & 0 deletions Editor/Platforms/iOS/Post/Archive/ArchiveWorkspace.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace UniTools.Build
{
public sealed class ArchiveWorkspace: Archive
{
protected override string CommandStart => "workspace";
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down

0 comments on commit 2a7490d

Please sign in to comment.