Skip to content

Commit 9bfe912

Browse files
authored
Merge pull request #37 from UniToolsTeam/feature/pragma
Feature/pragma
2 parents 1a5bb38 + a34b876 commit 9bfe912

File tree

5 files changed

+43
-2
lines changed

5 files changed

+43
-2
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System.Threading.Tasks;
2+
using UnityEditor;
3+
using UnityEngine;
4+
5+
namespace UniTools.Build
6+
{
7+
[CreateAssetMenu(
8+
fileName = nameof(CopyDirectory),
9+
menuName = MenuPaths.IO + nameof(CopyDirectory)
10+
)]
11+
public sealed class CopyDirectory : BuildStep
12+
{
13+
[SerializeField] private PathProperty m_source = default;
14+
[SerializeField] private PathProperty m_destination = default;
15+
16+
public override async Task Execute()
17+
{
18+
FileUtil.DeleteFileOrDirectory(m_destination.ToString());
19+
FileUtil.CopyFileOrDirectory(m_source.ToString(), m_destination.ToString());
20+
await Task.CompletedTask;
21+
}
22+
}
23+
}

Editor/IO/Directory/CopyDirectory.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Platforms/iOS/Steps/Distribute/DistributeIosApplicationStep.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.IO;
23
using UnityEngine;
34
#if UNITY_IOS
@@ -9,7 +10,10 @@ namespace UniTools.Build
910
public abstract class DistributeIosApplicationStep : BuildStep
1011
{
1112
[SerializeField, Tooltip("Can be found at Apple Developer Console")] private string m_teamId = string.Empty;
13+
#pragma warning disable
14+
//Pragma used to avoid miss values on another platform. Can't not be closed #if UNITY_IOS
1215
[SerializeField] private string m_provisioningProfileName = default;
16+
#pragma warning restore
1317
[SerializeField] private string m_bundleIdentifier = default;
1418
[SerializeField] private bool m_uploadBitcode = false;
1519
[SerializeField] private bool m_uploadSymbols = false;
@@ -26,7 +30,7 @@ protected string ExportOptionsPath
2630
return Path.Combine(m_pathToXCodeProject.ToString(), fileName);
2731

2832
#if !UNITY_IOS
29-
throw new System.Exception($"{nameof(DistributeIosApplicationStep)}: unsupported platform for {m_bundleIdentifier}, {m_uploadBitcode}, {m_uploadSymbols}");
33+
throw new Exception($"{nameof(DistributeIosApplicationStep)}: unsupported platform for {m_bundleIdentifier}, {m_uploadBitcode}, {m_uploadSymbols}");
3034
#endif
3135
}
3236
}

Editor/Platforms/iOS/Steps/Distribute/ExportIpa.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ namespace UniTools.Build
1616
)]
1717
public sealed class ExportIpa : DistributeIosApplicationStep
1818
{
19+
#pragma warning disable
20+
//Pragma used to avoid miss values on another platform. Can't not be closed #if UNITY_IOS
1921
[SerializeField, Tooltip("The method must correspond to the provision profile")] private ExportMethods m_method = ExportMethods.AdHoc;
22+
#pragma warning restore
2023

2124
public override async Task Execute()
2225
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"displayName": "UniTools.Build",
33
"name": "com.unitools.build",
4-
"version": "0.1.8-preview",
4+
"version": "0.1.9-preview",
55
"unity": "2019.1",
66
"description": "Customizable Build Pipeline for Unity3D",
77
"keywords": [

0 commit comments

Comments
 (0)