plus package

master
Yoshifumi Kawai 2019-05-20 02:12:11 +09:00
parent 20fea38bd7
commit aa33823a12
5 changed files with 85 additions and 17 deletions

View File

@ -32,27 +32,37 @@ jobs:
- unity_activate: - unity_activate:
unity_version: << parameters.unity_version >> unity_version: << parameters.unity_version >>
unity_license: << parameters.unity_license >> unity_license: << parameters.unity_license >>
# - run: - run:
# name: Build Linux(Mono) name: Build Linux(Mono)
# command: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod UnitTestBuilder.BuildUnitTest /headless /ScriptBackend Mono2x /BuildTarget StandaloneLinux64 command: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod UnitTestBuilder.BuildUnitTest /headless /ScriptBackend Mono2x /BuildTarget StandaloneLinux64
# working_directory: src/RandomFixtureKit.Unity working_directory: .
# - run: src/RandomFixtureKit.Unity/bin/UnitTest/StandaloneLinux64_Mono2x/test - run: ./bin/UnitTest/StandaloneLinux64_Mono2x/test
# build-and-create-package: build-and-create-package:
# executor: unity parameters:
# steps: unity_version: {type: string}
# - checkout unity_license: {type: string}
# - unity_activate executor:
# - run: name: unity
# name: Export unitypackage version: << parameters.unity_version >>
# command: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export steps:
# working_directory: src/MagicOnion.Client.Unity - checkout
# - store_artifacts: - unity_activate:
# path: src/MagicOnion.Client.Unity/MagicOnion.Client.Unity.unitypackage unity_version: << parameters.unity_version >>
# destination: /MagicOnion.Client.Unity.unitypackage unity_license: << parameters.unity_license >>
- run:
name: Export unitypackage
command: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
working_directory: .
- store_artifacts:
path: ./UniRx.Async.unitypackage
destination: /UniRx.Async.unitypackage
workflows: workflows:
version: 2 version: 2
build-unity: build-unity:
jobs: jobs:
- build-and-create-package:
unity_version: 2019.3.0a2
unity_license: ${UNITY_LICENSE_2019_3}
- build-and-test: - build-and-test:
unity_version: 2019.3.0a2 unity_version: 2019.3.0a2
unity_license: ${UNITY_LICENSE_2019_3} unity_license: ${UNITY_LICENSE_2019_3}

4
.gitignore vendored
View File

@ -141,3 +141,7 @@ UniRx\.Async\.Tests\.csproj
UniTask\.sln UniTask\.sln
RuntimeUnitTestToolkit\.csproj RuntimeUnitTestToolkit\.csproj
Assembly-CSharp-Editor\.csproj
UniRx\.Async\.unitypackage

8
Assets/Editor.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 99c8676e874bf0343b421d3527868f16
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,35 @@
#if UNITY_EDITOR
using System;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
public static class PackageExporter
{
[MenuItem("Tools/Export Unitypackage")]
public static void Export()
{
// configure
var root = "UniRx.Async";
var exportPath = "./UniRx.Async.unitypackage";
var path = Path.Combine(Application.dataPath, root);
var assets = Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories)
.Where(x => Path.GetExtension(x) == ".cs" || Path.GetExtension(x) == ".asmdef" || Path.GetExtension(x) == ".json")
.Select(x => "Assets" + x.Replace(Application.dataPath, "").Replace(@"\", "/"))
.ToArray();
UnityEngine.Debug.Log("Export below files" + Environment.NewLine + string.Join(Environment.NewLine, assets));
AssetDatabase.ExportPackage(
assets,
exportPath,
ExportPackageOptions.Default);
UnityEngine.Debug.Log("Export complete: " + Path.GetFullPath(exportPath));
}
}
#endif

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: af97405af79afbb4e9f7f49f30088474
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: