Skip to content

Commit

Permalink
Merge pull request #1 from UniToolsTeam/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Rinal authored Jun 21, 2021
2 parents fadea24 + eb78486 commit 7d1183f
Show file tree
Hide file tree
Showing 12 changed files with 170 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Editor/Steps.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Editor/Steps/Post.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Editor/Steps/Post/AppCenter.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions Editor/Steps/Post/AppCenter/DistributeToAppCenter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Threading.Tasks;
using UniTools.CLI;
using UniTools.IO;
using UnityEngine;

namespace UniTools.Build.AppCenter
{
[CreateAssetMenu(
fileName = nameof(DistributeToAppCenter),
menuName = nameof(UniTools) + "/Build/Steps/" + nameof(AppCenter) + "/Post/" + nameof(DistributeToAppCenter)
)]
public sealed class DistributeToAppCenter : ScriptablePostBuildStep
{
[SerializeField] private string m_appName = default;
[SerializeField] private string m_group = "Collaborators";
[SerializeField] private string m_apiToken = default;
[SerializeField] private PathProperty m_builtFilePath = default;

public override async Task Execute(string pathToBuiltProject)
{
await Task.CompletedTask;
string command = $"distribute release " +
$" --app {m_appName}" +
$" --file {m_builtFilePath.ToString()}" +
$" --group \"{m_group}\"" +
$" --token {m_apiToken}";

ToolResult result = Cli.Tool<CLI.AppCenter>().Execute(command, ProjectPath.Value);

if (result.ExitCode != 0)
{
throw new PostBuildStepFailedException($"{nameof(DistributeToAppCenter)}: Failed! {result.ToString()}");
}
}
}
}
3 changes: 3 additions & 0 deletions Editor/Steps/Post/AppCenter/DistributeToAppCenter.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Editor/UniTools.Build.AppCenter.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "UniTools.Build.AppCenter",
"rootNamespace": "UniTools.Build.AppCenter",
"references": [
"GUID:1ec9bc22e09f9407db909c86976e6505",
"GUID:e5a4c5b37842d4d11af3670f2f93f994",
"GUID:d94495eb8c16444dea063a3605506bac"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
7 changes: 7 additions & 0 deletions Editor/UniTools.Build.AppCenter.asmdef.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions LICENSE.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# UniTools Build AppCenter
Build steps to distribute the artifact to the AppCenter

# Features
- Using of the [AppCenter CLI](https://docs.microsoft.com/en-us/appcenter/cli/) deploy mobile builds (.ipa and .apk) to the App Center application

# Dependencies
- [UniTools CLI](https://github.com/UniToolsTeam/unitools-cli)
- [UniTools IO](https://github.com/UniToolsTeam/unitools-io)
- [UniTools Build](https://github.com/UniToolsTeam/unitools-build)

# Installation

### Download
[Latest Releases](../../releases/latest)

### Unity Package Manager (UPM)

> You will need to have git installed and set in your system PATH.
> Check package [dependencies](https://github.com/UniToolsTeam/unitools-build-ios/blob/master/package.json)
Add the following to `Packages/manifest.json` where x.x.x the version (tag) check [Latest Releases](../../releases/latest):

```
{
"dependencies": {
"com.unitools.cli": "https://github.com/UniToolsTeam/unitools-cli.git#x.x.x",
"com.unitools.io": "https://github.com/UniToolsTeam/unitools-io.git#x.x.x",
"com.unitools.build": "https://github.com/UniToolsTeam/unitools-build.git#x.x.x",
"com.unitools.appcenter": "https://github.com/UniToolsTeam/unitools-build-appcenter.git#x.x.x",
"...": "..."
}
}
```

# Getting Started
In progress..
21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"displayName": "UniTools.Build.AppCenter",
"name": "com.unitools.build.appcenter",
"version": "0.0.0",
"unity": "2019.1",
"dependencies": {
"com.unitools.cli": "0.0.0",
"com.unitools.io": "0.0.0",
"com.unitools.build": "0.0.0"
},
"keywords": [
"unity",
"unity3d",
"cli",
"CI",
"CD",
"C#"
],
"category": "Libraries",
"type": "library"
}
7 changes: 7 additions & 0 deletions package.json.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7d1183f

Please sign in to comment.