-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
21 lines (19 loc) · 955 Bytes
/
Directory.Build.targets
File metadata and controls
21 lines (19 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<Project>
<PropertyGroup>
<PackageReleaseNotesFile>..\..\.nuget\$(MSBuildProjectName)\PackageReleaseNotes.txt</PackageReleaseNotesFile>
</PropertyGroup>
<Target Name="PreparePackageReleaseNotesFromFile" BeforeTargets="GenerateNuspec" Condition="'$(IsTestProject)' == 'false' AND Exists('$(PackageReleaseNotesFile)')">
<ReadLinesFromFile File="$(PackageReleaseNotesFile)">
<Output TaskParameter="Lines" ItemName="PackageReleaseNotesLines"/>
</ReadLinesFromFile>
<PropertyGroup>
<PackageReleaseNotes>@(PackageReleaseNotesLines, '%0A')</PackageReleaseNotes>
</PropertyGroup>
</Target>
<Target Name="ApplyFileVersion" AfterTargets="MinVer">
<PropertyGroup>
<GITHUB_RUN_NUMBER Condition="'$(GITHUB_RUN_NUMBER)' == ''">0</GITHUB_RUN_NUMBER>
<FileVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(GITHUB_RUN_NUMBER)</FileVersion>
</PropertyGroup>
</Target>
</Project>