-
Notifications
You must be signed in to change notification settings - Fork 248
Expand file tree
/
Copy pathSteeltoe.Samples.ActuatorWeb.csproj
More file actions
57 lines (51 loc) · 3.54 KB
/
Steeltoe.Samples.ActuatorWeb.csproj
File metadata and controls
57 lines (51 loc) · 3.54 KB
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
49
50
51
52
53
54
55
56
57
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Do not override package/assembly/file version with the version from git metadata when using GitInfo. -->
<GitVersion>false</GitVersion>
<!-- Do not generate (unused) C# classes from git metadata when using GitInfo. -->
<GitThisAssembly>false</GitThisAssembly>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="idunno.Authentication.Basic" Version="2.4.*" />
<PackageReference Include="OpenTelemetry.Exporter.Zipkin" Version="$(OpenTelemetryVersion)" />
<PackageReference Include="OpenTelemetry.Extensions.Propagators" Version="$(OpenTelemetryVersion)" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="$(OpenTelemetryVersion)" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="$(OpenTelemetryVersion)" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="$(OpenTelemetryVersion)" />
<PackageReference Include="Steeltoe.Configuration.CloudFoundry" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Management.Prometheus" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Management.Tracing" Version="$(SteeltoeVersion)" />
</ItemGroup>
<!--
In order to prevent build issues with processing a nonexistent .git folder (such as during staging in Cloud Foundry),
the following sections are only evaluated when the environment variable "CF_STACK" is NOT set.
-->
<ItemGroup Condition="'$(CF_STACK)' == ''">
<PackageReference Include="GitInfo" Version="3.5.*" PrivateAssets="all">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<Target Name="WriteGitPropertiesToFile" AfterTargets="CoreCompile" Condition="'$(CF_STACK)' == ''">
<!-- Generate git.properties file from the MSBuild properties provided by the GitInfo NuGet package. -->
<!-- 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="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>
<ItemGroup Condition="'$(CF_STACK)' == ''">
<None Update="git.properties">
<!-- Ensure that the git.properties file ends up in the Publish directory. -->
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>