-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDirectory.Build.targets
22 lines (22 loc) · 1.16 KB
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemGroup>
<PackageReference Update="aqua-core" Version="$(AquaCoreVersion)" />
<PackageReference Update="aqua-core-newtonsoft-json" Version="$(AquaCoreVersion)" />
<PackageReference Update="aqua-core-protobuf-net" Version="$(AquaCoreVersion)" />
<PackageReference Update="aqua-core-text-json" Version="$(AquaCoreVersion)" />
</ItemGroup>
<Target Name="InitializeSourceControlInformation" BeforeTargets="AddSourceRevisionToInformationalVersion">
<Exec
Command="git describe --long --always --dirty --exclude=* --abbrev=8"
ConsoleToMSBuild="True"
IgnoreExitCode="False">
<Output PropertyName="SourceRevisionId" TaskParameter="ConsoleOutput"/>
</Exec>
</Target>
<Target Name="CheckVersion">
<Message Text="Check Version: '$(BuildVersion)' == '$(VersionPrefix)' [$(MSBuildProjectFile)]" Importance="high" />
<Error Condition=" '$(BuildVersion)' == '' " Text="Build version must not be emty" />
<Error Condition=" '$(BuildVersion)' != '$(VersionPrefix)' " Text="Build version '$(BuildVersion)' does not match project version '$(VersionPrefix)'" />
</Target>
</Project>