This repository has been archived by the owner on Oct 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Sample.csproj
48 lines (42 loc) · 2.4 KB
/
Sample.csproj
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>
<PropertyGroup>
<SteeltoeVersion>3.2.*</SteeltoeVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitInfo" Version="2.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Steeltoe.Extensions.Logging.DynamicLogger" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Management.EndpointCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Management.TracingCore" Version="$(SteeltoeVersion)" />
</ItemGroup>
<ItemGroup>
<Content Include="StaticFiles/**/*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="git.properties" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Target Name="_GitProperties" AfterTargets="CoreCompile">
<!-- https://github.com/devlooped/GitInfo/blob/main/src/GitInfo/build/GitInfo.targets -->
<WriteLinesToFile File="git.properties" Lines="git.remote.origin.url=$(GitRepositoryUrl)" Overwrite="true" />
<WriteLinesToFile File="git.properties" Lines="git.build.version=$(GitBaseVersion)" Overwrite="false" />
<WriteLinesToFile File="git.properties" Lines="[email protected]" Overwrite="false" />
<WriteLinesToFile File="git.properties" Lines="git.commit.id.abbrev=$(GitCommit)" Overwrite="false" />
<WriteLinesToFile File="git.properties" Lines="git.commit.id=$(GitSha)" Overwrite="false" />
<WriteLinesToFile File="git.properties" Lines="git.commit.time=$(GitCommitDate)" Overwrite="false" />
<WriteLinesToFile File="git.properties" Lines="git.tags=$(GitTag)" Overwrite="false" />
<WriteLinesToFile File="git.properties" Lines="git.branch=$(GitBranch)" Overwrite="false" />
<WriteLinesToFile File="git.properties" Lines="git.build.time=$([System.DateTime]::Now.ToString('O'))" Overwrite="false" />
<WriteLinesToFile File="git.properties" Lines="git.build.user.name=$([System.Environment]::GetEnvironmentVariable('USERNAME'))" Overwrite="false" />
<WriteLinesToFile File="git.properties" Lines="git.build.host=$([System.Environment]::GetEnvironmentVariable('COMPUTERNAME'))" Overwrite="false" />
</Target>
</Project>