forked from yevhen/Streamstone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
91 lines (81 loc) · 4.05 KB
/
Directory.Build.props
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<Project>
<!-- Set the repository root into a variable -->
<PropertyGroup>
<SourceRoot>$(MSBuildThisFileDirectory)</SourceRoot>
</PropertyGroup>
<PropertyGroup>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
<!-- Set common properties regarding assembly information and nuget packages -->
<PropertyGroup>
<Authors>Nathan Keir, Yevhen Bobrov</Authors>
<Product>Streamstone</Product>
<Copyright>since 2016 © Yevhen Bobrov. All rights reserved.</Copyright>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>http://github.com/yevhen/Streamstone</PackageProjectUrl>
<PackageIcon>Logo.png</PackageIcon>
<PackageTags>event store eventstore eventsourcing event-sourcing CQRS azure table storage stream</PackageTags>
<PackageReleaseNotes></PackageReleaseNotes>
<RepositoryUrl>https://github.com/waywedo/waywedo.Streamstone</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<ItemGroup>
<None Include="$(SourceRoot)Logo.png" Pack="true" Visible="false" PackagePath="/" />
<None Include="$(SourceRoot)LICENSE" Pack="true" Visible="false" PackagePath="/" />
</ItemGroup>
<!-- Common compile parameters -->
<PropertyGroup>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);1591</NoWarn>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<DebugType>portable</DebugType>
</PropertyGroup>
<!-- Common project props -->
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>10</LangVersion>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<PropertyGroup>
<LibProjectTargetFramework>net8.0</LibProjectTargetFramework>
<ConsoleProjectTargetFramework>net8.0</ConsoleProjectTargetFramework>
<TestProjectTargetFramework>$(ConsoleProjectTargetFramework)</TestProjectTargetFramework>
</PropertyGroup>
<!-- For Debug builds add a dev version suffix -->
<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
<VersionSuffix>dev</VersionSuffix>
</PropertyGroup>
<Choose>
<When Condition="'$(OfficialBuild)' != 'true'">
<!-- On non-official builds we don't burn in a git sha. In large part because it
hurts our determinism efforts as binaries which should be the same between
builds will not (due to developers building against different HEAD values -->
<PropertyGroup>
<GitHeadSha><developer build></GitHeadSha>
</PropertyGroup>
</When>
<When Condition="'$(BUILD_SOURCEVERSION)' != ''">
<PropertyGroup>
<GitHeadSha>$(BUILD_SOURCEVERSION)</GitHeadSha>
</PropertyGroup>
</When>
<When Condition="'$(BUILD_SOURCEVERSION)' == '' AND '$(GIT_COMMIT)' != ''">
<PropertyGroup>
<GitHeadSha>$(GIT_COMMIT)</GitHeadSha>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<GitHeadSha>Not found</GitHeadSha>
<DotGitDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory).git'))</DotGitDir>
<HeadFileContent Condition="Exists('$(DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(DotGitDir)/HEAD').Trim())</HeadFileContent>
<RefPath Condition="$(HeadFileContent.StartsWith('ref: '))">$(DotGitDir)/$(HeadFileContent.Substring(5))</RefPath>
<GitHeadSha Condition="'$(RefPath)' != '' AND Exists('$(RefPath)')">$([System.IO.File]::ReadAllText('$(RefPath)').Trim())</GitHeadSha>
<GitHeadSha Condition="'$(HeadFileContent)' != '' AND '$(RefPath)' == ''">$(HeadFileContent)</GitHeadSha>
</PropertyGroup>
</Otherwise>
</Choose>
</Project>