Skip to content

Commit 83ac8a8

Browse files
committed
UMM - Auto generate Info.json on build
1 parent 97539d0 commit 83ac8a8

2 files changed

Lines changed: 19 additions & 18 deletions

File tree

‎RuntimeUnityEditor.UMM/Info.json‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎RuntimeUnityEditor.UMM/RuntimeUnityEditor.UMM.csproj‎

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,24 @@
1313
<GenerateDocumentationFile>True</GenerateDocumentationFile>
1414
</PropertyGroup>
1515

16-
<ItemGroup>
17-
<None Update="Info.json">
18-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
19-
</None>
20-
</ItemGroup>
16+
<Target Name="GenerateInfoJson" AfterTargets="Build" BeforeTargets="CreateReleaseZip">
17+
<PropertyGroup>
18+
<InfoJsonContent>
19+
{
20+
"Id": "RuntimeUnityEditor",
21+
"DisplayName": "Runtime Unity Editor",
22+
"Author": "Vanguard, ManlyMarco",
23+
"Version": "$(Version)",
24+
"ManagerVersion": "0.27.2",
25+
"AssemblyName": "RuntimeUnityEditor.UMM.dll",
26+
"EntryMethod": "RuntimeUnityEditor.UMM.RuntimeUnityEditorUMM.Load",
27+
"Repository": "https://raw.githubusercontent.com/ManlyMarco/RuntimeUnityEditor/master/RuntimeUnityEditor.UMM/Repository.json",
28+
"HomePage": "https://github.com/ManlyMarco/RuntimeUnityEditor"
29+
}
30+
</InfoJsonContent>
31+
</PropertyGroup>
32+
<WriteLinesToFile File="$(OutputPath)Info.json" Lines="$(InfoJsonContent)" Overwrite="true" />
33+
</Target>
2134

2235
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
2336
<Delete Files="$(OutputPath)\mcs.pdb" />
@@ -44,8 +57,7 @@
4457
<Target Name="_ResolveCopyLocalNuGetPkgXmls" AfterTargets="ResolveReferences">
4558
<ItemGroup>
4659
<!-- Copy XML files from all PackageReferences to output dir -->
47-
<ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).xml')"
48-
Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)'!='' and Exists('%(RootDir)%(Directory)%(Filename).xml')" />
60+
<ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).xml')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)'!='' and Exists('%(RootDir)%(Directory)%(Filename).xml')" />
4961
</ItemGroup>
5062
</Target>
5163

0 commit comments

Comments
 (0)