-
Notifications
You must be signed in to change notification settings - Fork 0
/
Thunderstore.props
28 lines (28 loc) · 1.6 KB
/
Thunderstore.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<Project>
<PropertyGroup>
<ThunderstoreDirectory Condition="'$(ThunderstoreDirectory)' == ''">$(MSBuildProjectDirectory)\Thunderstore</ThunderstoreDirectory>
</PropertyGroup>
<Target Name="AddThunderstoreManifest" BeforeTargets="BeforeCompile;CoreCompile" Inputs="$(MSBuildAllProjects)" Outputs="$(ThunderstoreDirectory)\manifest.json">
<PropertyGroup>
<ThunderstoreName Condition="'$(ThunderstoreName)' == ''">$(AssemblyName)</ThunderstoreName>
<ThunderstoreVersion Condition="'$(ThunderstoreVersion)' == ''">$(Version)</ThunderstoreVersion>
<ThunderstoreModURL Condition="'$(ThunderstoreModURL)' == ''">$(ModURL)</ThunderstoreModURL>
<ThunderstoreDescription Condition="'$(ThunderstoreDescription)' == ''">$(ModDescription)</ThunderstoreDescription>
<ThunderstoreDependencies Condition="'$(ThunderstoreDependencies)' == ''">@(ModDependencies->'"%(Identity)"', ',')</ThunderstoreDependencies>
<GeneratedText>
{
"name": "$(ThunderstoreName)",
"version_number": "$(ThunderstoreVersion)",
"website_url": "$(ThunderstoreModURL)",
"description": "$(ThunderstoreDescription)",
"dependencies": [$(ThunderstoreDependencies)]
}
</GeneratedText>
<GeneratedFilePath>$(ThunderstoreDirectory)\manifest.json</GeneratedFilePath>
</PropertyGroup>
<ItemGroup>
<FileWrites Include="$(GeneratedFilePath)" />
</ItemGroup>
<WriteLinesToFile Lines="$(GeneratedText)" File="$(GeneratedFilePath)" WriteOnlyWhenDifferent="true" Overwrite="true" />
</Target>
</Project>