refactor(mod): renamed project file and made build script zip releases automagically
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,4 +3,4 @@ obj/
|
||||
/packages/
|
||||
riderModule.iml
|
||||
/_ReSharper.Caches/
|
||||
Server/Server.csproj.user
|
||||
WeebSights/WeebSights.csproj.user
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{D2A6BE7F-0C34-4655-88EF-BC319CD2C069}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeebSights", "WeebSights\WeebSights.csproj", "{D2A6BE7F-0C34-4655-88EF-BC319CD2C069}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
@@ -53,8 +53,10 @@ public class WeebItemService(ISptLogger<WeebItemService> logger, JsonUtil jsonUt
|
||||
{
|
||||
logger.Error("[Weeb Iron Sights] Failed to add filter to item " + item.Key);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
#if DEBUG
|
||||
logger.Success($"[Weeb Iron Sights] Added {sight.Id} to filter on item {item.Key}");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,23 +9,7 @@
|
||||
<AssemblyVersion>1.0.0</AssemblyVersion>
|
||||
<FileVersion>1.0.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<ModsDirectoryPath>$(SPTPath)user/mods/$(MSBuildProjectName)</ModsDirectoryPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="CopyToSPT" AfterTargets="AfterBuild" Condition="'$(SPTPath)' != ''">
|
||||
<Message Importance="high" Text="Copying mods to $(ModsDirectoryPath)" />
|
||||
<ItemGroup>
|
||||
<FilesToCopy Include="$(OutputPath)$(TargetName)$(TargetExt)" />
|
||||
<FilesToCopy Include="$(OutputPath)$(TargetName).pdb" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(FilesToCopy)" DestinationFolder="$(ModsDirectoryPath)" ContinueOnError="false" />
|
||||
<Message Text="Files copied" />
|
||||
</Target>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SPTarkov.Server.Core" Version="4.0.3" />
|
||||
@@ -34,7 +18,7 @@
|
||||
<Content Include="bundles\**">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Server.csproj.user" />
|
||||
<Content Include="WeebSights.csproj.user" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="bundles.json">
|
||||
@@ -46,4 +30,35 @@
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')" />
|
||||
<PropertyGroup>
|
||||
<ModsDirectoryPath>$(SPTPath)user/mods/$(MSBuildProjectName)</ModsDirectoryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DebugType>none</DebugType>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="CopyToSPT" AfterTargets="AfterBuild" Condition="'$(SPTPath)' != ''">
|
||||
<Message Importance="high" Text="Copying mods to $(ModsDirectoryPath)" />
|
||||
<Delete Files="$(OutputPath)/$(MSBuildProjectName).deps.json" />
|
||||
<ItemGroup>
|
||||
<FilesToCopy Include="$(OutputPath)/**" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(FilesToCopy)" DestinationFolder="$(ModsDirectoryPath)\%(RecursiveDir)" ContinueOnError="false" />
|
||||
<Message Text="Files copied" />
|
||||
</Target>
|
||||
|
||||
<Target Name="MakeZIPFile" AfterTargets="AfterBuild" Condition="'$(Configuration)' == 'Release'">
|
||||
<ItemGroup>
|
||||
<FilesToMove Include="$(OutputPath)/**"/>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<FolderToMove>$(OutputPath)../package/SPT/user/mods/$(MSBuildProjectName)</FolderToMove>
|
||||
</PropertyGroup>
|
||||
<Message Importance="high" Text="Making zip file for redistribution" />
|
||||
<MakeDir Directories="$(FolderToMove)"/>
|
||||
<Move SourceFiles="@(FilesToMove)" DestinationFolder="$(FolderToMove)\%(RecursiveDir)" />
|
||||
<ZipDirectory DestinationFile="$(OutputPath)../$(MSBuildProjectName)-$(AssemblyVersion)" SourceDirectory="$(OutputPath)../package/" />
|
||||
</Target>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user