Namespaces, assemblies, projects and directories, the solution, binaries, images, systemd units, config paths, environment variables, protocol method names, the media type and the raw chunk magic all move to MoShiro/moshiro. Existing data and deployments are not compatible and must be recreated. Also fix the architecture tests after the solution layout change and make the update tests independent of their order.
36 lines
1.9 KiB
XML
36 lines
1.9 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
||
<PropertyGroup>
|
||
<IsAotCompatible>true</IsAotCompatible>
|
||
</PropertyGroup>
|
||
<ItemGroup>
|
||
<ProjectReference Include="..\..\fleet\src\Fleet.Core\Fleet.Core.csproj" />
|
||
<ProjectReference Include="..\..\fleet\src\Fleet.Rpc\Fleet.Rpc.csproj" />
|
||
</ItemGroup>
|
||
<!--
|
||
构建信息:版本来自 $(Version),tag、提交、构建时间来自环境变量 MOSHIRO_TAG / MOSHIRO_COMMIT / MOSHIRO_BUILT_AT
|
||
(scripts/publish.sh 和 CI 会设置;本地开发不设置就是空,这样本地构建是可重复的、不会每次都重新编译)。
|
||
生成一个带常量的源文件,NativeAOT 下不用反射。
|
||
-->
|
||
<Target Name="WriteBuildInfo" BeforeTargets="CoreCompile">
|
||
<PropertyGroup>
|
||
<BuildInfoFile>$(IntermediateOutputPath)BuildInfo.g.cs</BuildInfoFile>
|
||
</PropertyGroup>
|
||
<ItemGroup>
|
||
<BuildInfoLine Include="namespace MoShiro.Protocol%3B" />
|
||
<BuildInfoLine Include="/// <summary>这个程序是什么时候、从哪个版本构建出来的(构建时生成)。</summary>" />
|
||
<BuildInfoLine Include="public static class BuildInfo" />
|
||
<BuildInfoLine Include="{" />
|
||
<BuildInfoLine Include=" public const string Version = "$(Version)"%3B" />
|
||
<BuildInfoLine Include=" public const string Tag = "$(MOSHIRO_TAG)"%3B" />
|
||
<BuildInfoLine Include=" public const string Commit = "$(MOSHIRO_COMMIT)"%3B" />
|
||
<BuildInfoLine Include=" public const string BuiltAt = "$(MOSHIRO_BUILT_AT)"%3B" />
|
||
<BuildInfoLine Include="}" />
|
||
</ItemGroup>
|
||
<WriteLinesToFile File="$(BuildInfoFile)" Lines="@(BuildInfoLine)" Overwrite="true" WriteOnlyWhenDifferent="true" />
|
||
<ItemGroup>
|
||
<Compile Include="$(BuildInfoFile)" />
|
||
<FileWrites Include="$(BuildInfoFile)" />
|
||
</ItemGroup>
|
||
</Target>
|
||
</Project>
|