Skip to content

Commit

Permalink
Updating common
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwDayDream committed Sep 23, 2024
1 parent 835f866 commit 64c86ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
5 changes: 3 additions & 2 deletions MSBuild/Common.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project InitialTargets="IncludeMinVer" DefaultTargets="SetupMinVer">
<Project InitialTargets="IncludeMinVer">
<PropertyGroup>
<AssemblyName>wwwDayDream.$(MSBuildProjectName)</AssemblyName>
<Product>$(MSBuildProjectName)</Product>
Expand Down Expand Up @@ -27,11 +27,12 @@
<PackageReference Include="MinVer" Version="5.0.0" PrivateAssets="all"/>
</ItemGroup>
</Target>
<Target Name="SetupMinVer" DependsOnTargets="MinVer">
<Target Name="SetupMinVer" AfterTargets="MinVer">
<PropertyGroup>
<AssemblyVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch).0</AssemblyVersion>
<PlainVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch)</PlainVersion>
<BepInExPluginVersion>$(PlainVersion)</BepInExPluginVersion>
<PackageVersion>$(PlainVersion)</PackageVersion>
</PropertyGroup>
</Target>
</Project>
14 changes: 2 additions & 12 deletions MSBuild/Packaging.TCLI.targets
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@
</ItemGroup>
<PropertyGroup>
<PackageDescription Condition="'$(PackageDescription)' == 'Package Description'">%(PackageReadmeNoHashFileLines.Identity)</PackageDescription>

<NupkgOutputPath>$([System.IO.Path]::GetFullPath('$(MSBuildProjectPath)$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg'))</NupkgOutputPath>
<TCLIOutputPath>$([System.IO.Path]::GetFullPath('$(MSBuildProjectPath)$(PackageOutputPath)$(PackageAuthor)-$(PackageId)-$(PackageVersion).zip'))</TCLIOutputPath>
</PropertyGroup>
</Target>

<Target Name="AfterBuildPackaging" AfterTargets="Build" BeforeTargets="GenerateNuspec">
<PropertyGroup>
<PackagesOutputPath>$([System.IO.Path]::GetFullPath('$(MSBuildProjectPath)$(PackageOutputPath)'))</PackagesOutputPath>
<NupkgOutputPath>$([System.IO.Path]::GetFullPath('$(MSBuildProjectPath)$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg'))</NupkgOutputPath>
<TCLIOutputPath>$([System.IO.Path]::GetFullPath('$(MSBuildProjectPath)$(PackageOutputPath)$(PackageAuthor)-$(PackageId)-$(PackageVersion).zip'))</TCLIOutputPath>
</PropertyGroup>
Expand Down Expand Up @@ -134,14 +132,6 @@
</Target>

<Target Name="PostPackFileWrites" AfterTargets="GenerateNuspec">
<ItemGroup>
<Packages Condition="Exists($(NupkgOutputPath))" Include="NUPKG=$(NupkgOutputPath)"/>
<Packages Condition="Exists($(TCLIOutputPath))" Include="TSPKG=$(TCLIOutputPath)"/>
</ItemGroup>
<PropertyGroup>
<FinalOutput Condition="'@(Packages->Count())' == '0'">-1</FinalOutput>
<FinalOutput Condition="'@(Packages->Count())' > '0'">@(Packages)</FinalOutput>
</PropertyGroup>
<Message Importance="high" Text="$(FinalOutput)"/>
<Message Importance="high" Text="$(PackagesOutputPath)"/>
</Target>
</Project>

0 comments on commit 64c86ca

Please sign in to comment.