Squash of recent dev work: return_session login, backend switcher, line detail timeline, overview strips, node platform/country/ISP info with flags and icons, build info (version, tag, time) behind site.show_build, and the acrylic display theme.
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、提交、构建时间来自环境变量 MONITOR_TAG / MONITOR_COMMIT / MONITOR_BUILT_AT
|
||
(scripts/publish.sh 和 CI 会设置;本地开发不设置就是空,这样本地构建是可重复的、不会每次都重新编译)。
|
||
生成一个带常量的源文件,NativeAOT 下不用反射。
|
||
-->
|
||
<Target Name="WriteBuildInfo" BeforeTargets="CoreCompile">
|
||
<PropertyGroup>
|
||
<BuildInfoFile>$(IntermediateOutputPath)BuildInfo.g.cs</BuildInfoFile>
|
||
</PropertyGroup>
|
||
<ItemGroup>
|
||
<BuildInfoLine Include="namespace Monitor.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 = "$(MONITOR_TAG)"%3B" />
|
||
<BuildInfoLine Include=" public const string Commit = "$(MONITOR_COMMIT)"%3B" />
|
||
<BuildInfoLine Include=" public const string BuiltAt = "$(MONITOR_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>
|